Put a blank __init__.py file in the extensions directory, assuming the containing folder is in the python path (which it probably is). -- Andy McKay www.agmweb.ca ----- Original Message ----- From: "Courtland Idstrom" <court@pixar.com> To: <zope@zope.org> Sent: Friday, September 27, 2002 10:13 AM Subject: [Zope] import inside an external method
Hi -
I'm dealing with a few external methods that I prefer to keep in separate files. There are a few shared routines that I need to import from them, but unfortunately I can't find a way to import things in the Extensions directory (for example I need to import a few things from a files called shared.py). The only way I've successfully gotten this to work is by adding the current path to Extensions to sys.path before 'import shared'. I'd rather not do it this way in case my zope installation moves paths/servers, etc.
Notice that the usual __path__ and __file__ properties from python seem to be inaccessible, so I can't add it to sys.path in a way that's going to work in the future.
Any ideas?
Thanks -Courtland
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )