Importing different versions of a module
mercado mercado
mercado949 at gmail.com
Wed Jul 23 18:14:30 EDT 2008
Thank you Fredrik. This is exactly what I was looking for.
> cannot you just insert the appropriate directory in sys.path the first
> thing you do in the scripts? e.g.
>
> import os, sys
>
> lib = "lib_dev" # change this for prod/rss.py
>
> sys.path.insert(0,
> os.path.join(
> os.path.dirname(os.__file__), "site-packages", lib
> ))
>
> import parse # picks the right one
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080723/0872b88d/attachment-0001.html>
More information about the Python-list
mailing list