--On 13. Februar 2007 13:10:17 +0000 Alan <[EMAIL PROTECTED]> wrote:

Thanks Andreas, I am trying with:

if sys.path.count(myPath) == 0: sys.path.insert(0, myPath)

What's the sense of this code? sys.path is usually *never* empty.
You should really look at the Python docs and learn where Python is looking by default for modules. Is is perfectly documented -> python.org -> documentation.

In addition you would like to check for the existence of an item in sys.path using

if myPath in sys.path:


Attachment: pgp96jJNlbS0E.pgp
Description: PGP signature

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to