rantingrickjohnson at gmail.com
Wed Feb 1 18:17:04 CET 2012
On Feb 1, 10:15 am, Andrea Crotti <andrea.crott... at 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
> but it still doesn't work and I get an import error.
> If I take these paths and add them to site-packages/my_paths.pth
> everything works, but at run-time the paths which I actually see before
> importing are exactly the same.
1. Is paths_to_add a nested list?
2. Have you tried inspecting the contents of sys.path AFTER calling
More information about the Python-list