2004年09月24日 星期五 08:55
x = syncLdap 这句话怎么没写()呢。这样不会创建对象啊。是不是笔误啊:) On Fri, 24 Sep 2004 07:53:36 +0800, 0.706 <0.706 at 163.com> wrote: > mike gaul,您好! > > ======= 2004-09-23 16:25:11 您在来信中写道:======= > > >====================================================== > >syncLdap.py > > > >class syncLdap: > > def readLdap(): > > """ > > """ > > > > try: > > l = ldap.open(ldap_host,ldap_port) > > l.protocol_version = ldap.VERSION3 > > l.simple_bind_s(ldap_admin, ldap_pw) > > > > print "Successfully bound to server.\n" > > > > except ldap.LDAPError, error_message: > > print "Couldn't Connect. %s " % > >error_message > > > >====================================================== > >ldap2db.py > > > >#!/usr/bin/python > > > >import ldap > > > >from config import * > > > >import syncLdap > > > >x = syncLdap > 改成 x=syncLdap()试试 > >x.readLdap() > > > >===================================================== > >运行结果怎么回事这样呢??? > >python ldap2db.py > > > >Traceback (most recent call last): > > File "ldap2db.py", line 27, in ? > > x.readLdap() > >AttributeError: 'module' object has no attribute > >'readLdap' > > > > > >_________________________________________________________ > >Do You Yahoo!? > >150万曲MP3疯狂搜,带您闯入音乐殿堂 > >http://music.yisou.com/ > >美女明星应有尽有,搜遍美图、艳图和酷图 > >http://image.yisou.com > >1G就是1000兆,雅虎电邮自助扩容! > >http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/ > >_______________________________________________ > >python-chinese list > >python-chinese at lists.python.cn > >http://python.cn/mailman/listinfo/python-chinese > > > > = = = = = = = = = = = = = = = = = = = = > > 致 > 礼! > > 0.706 > 0.706 at 163.com > 2004-09-24 > > > > _______________________________________________ > python-chinese list > python-chinese at lists.python.cn > http://python.cn/mailman/listinfo/python-chinese > > > -- I like python!
Zeuux © 2025
京ICP备05028076号