Hi,

When developing tools I often also work on a module that I need to import into that tool. Once the work is complete both (or more) files go to a release location on the network.

The question I have is: what is the easiest way to adjust the import path depending on whether it's a release or dev version.

Right now I am using a custom env var (PYDEV) that I have to manually set when I work on the project that will insert the development module path into sys.path. This way the released version will not append the path and use the system wide PYTHONPATH

Are there any better ways of doing this? I don't like the idea of flags inside the code as they can often get missed when developers release their code, ending up with released versions that import modules from the developer's working directory.

Thanks

--
./Sven

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to