import logging fails on MacPython 2.4.3
Diez B. Roggisch
deets at nospam.web.de
Wed Aug 9 03:53:19 EDT 2006
Tod Olson schrieb:
> Anyone have advice for importing the logging module using MacPython 2.4.3?
>
> MacPython installs the logging module in:
>
> /Library/Frameworks/Python.framework/Versions/2.4/lib/logging/
On my machine, that is
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/logging
> There's an __init__.py there and everything, but this directory is not
> in sys.path. I add it to sys.path as follows:
>
> >>> sys.path.append(os.path.join(sys.prefix, 'lib', 'logging'))
> >>> print sys.path[-1]
> /Library/Frameworks/Python.framework/Versions/2.4/lib/logging
Which is wrong - you'd have to add the path without the logging part!
Diez
More information about the Python-list
mailing list