Python discussion: Difference between revisions

imported>Makefu
No edit summary
imported>Das-g
m fix typo
Line 4: Line 4:
:Python supports *.pth files which contain the paths to the parent directories of your python modules one per line. Those files are placed in site-packages and are typically generated by python package managers such as easy_install.
:Python supports *.pth files which contain the paths to the parent directories of your python modules one per line. Those files are placed in site-packages and are typically generated by python package managers such as easy_install.
* PYTHONPATH
* PYTHONPATH
:The other way is to set additional paths for the required modules before running python. This is done by setting the python paths in the environment variable PYTHONPATH. A path typcially looks like this on a Nix system: /nix/store/fxpfc2hyw5qbxly8xwrxzai8lny4pcq2-ipython-0.11/lib/python2.7/site-packages/ipython-0.11-py2.7.egg
:The other way is to set additional paths for the required modules before running python. This is done by setting the python paths in the environment variable PYTHONPATH. A path typically looks like this on a Nix system: /nix/store/fxpfc2hyw5qbxly8xwrxzai8lny4pcq2-ipython-0.11/lib/python2.7/site-packages/ipython-0.11-py2.7.egg
* PYTHONUSERBASE
* PYTHONUSERBASE
:?
:?