Q: How to install my own library on linux ?
jnix at rioverde.cafeconleche.de
Wed Dec 6 18:05:44 CET 2000
hwan-jo yu <hwanjoyu at students.uiuc.edu> writes:
> When we do "import something", it checks the files in sys.path list.
> I would like to add my own library path in the sys.path list, but I don't
> want to do sys.path.append() every source.
> Is there any way to modify data of the original sys.path of python2.0 on
> linux, so a source doesn't have to do sys.path append() to import my
> library file ?
For the simple cases it should be sufficient to set the PYTHONPATH
environment variable. For example you could do
in your .profile file.
Of course this can be made processor-specific as well. Clearly, this
does not work if you have conflicting names for modules.
More information about the Python-list