Hi all Doubtless there is a very simple solution to my problem ...
I've installed python2.4 with a handful of supporting modules (well, one, ldap) from darwinports. The following works fine provided I type it in interactively in a python session, but not as a script:- $ cat bin/testldapimport.py #!/opt/local/bin/python import ldap import os import sys def goodbye(exitmessage, exitcode): print exitmessage sys.exit(exitcode) goodbye("quiting",0) $ $ $ /opt/local/bin/python Python 2.4.1 (#1, Oct 10 2005, 11:15:09) [GCC 3.3 20030304 (Apple Computer, Inc. build 1671)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> #!/opt/local/bin/python ... import ldap >>> import os >>> import sys >>> >>> def goodbye(exitmessage, exitcode): ... print exitmessage ... sys.exit(exitcode) ... >>> goodbye("quiting",0) quiting But running the same coede as a script generates an error:- $ $ /opt/local/bin/python bin/testldapimport.py Traceback (most recent call last): File "bin/testldapimport.py", line 2, in ? import ldap File "/Users/glaw/bin/ldap.py", line 23, in ? except ldap.LDAPError, error_message: AttributeError: 'module' object has no attribute 'LDAPError' Cluestick? I'm lost as to what could be going wrong here... -- [EMAIL PROTECTED] U n d e r a c h i e v e r _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig