Question

I inherited a python project, which has been packaged as egg. Upon check out through SVN, I am seeing package content as:

__init__.py
scripts/
ptools/
setup.py
...

Here, ptools/ hold the source of various modules. scripts/ is bunch of end-user tools that make use of modules provided by the "ptools". The package has been installed on this shared host environment through "easy_install", but I want to modify both scripts/ and ptools/ and test them out without having to go through the cycle of "make an egg, and easy_install" that will affect everyone else.

However, I am lost on how to make environment changes to make scripts/ not to search default .egg when invoking through my development tree, instead of using the "local" modules in ptools/ ... any ideas?

Update: I should have added that I tried PYTHONPATH approach by putting the module path in dev tree there, but then I tried verify through "import sys; print sys.path", there is no change in module search path, which baffles me.

thanks

Oliver

Was it helpful?

Solution

I think I have found the solution to my problem, and this has been answered in the following post. "setup.py develop" seems to be the perfect solution

PYTHONPATH vs. sys.path

OTHER TIPS

You can use the PYTHONPATH environment variable to customize the locations Python searches for modules.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top