Andrea Crotti <andrea.crott...@gmail.com> wrote:
>
>So suppose I want to modify the sys.path on the fly before running some code
>which imports from one of the modules added.
>
>at run time I do
>sys.path.extend(paths_to_add)
>
>but it still doesn't work and I get an import error.

Are you actually adding multiple paths?  One possible cause for error would
be this:
    sys.path.extend( '/usr/local/lib' )

That succeeds, but it doesn't do what you meant.  It adds "/" as a path,
then "u", then "s", then "r", and so on.
-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to