views:

28

answers:

2
+1  Q: 

Pythonpath Store

Where is my pythonpath stored? When I write

import sys
sys.path

Where does python get that data?

A: 

Python gets that data from the path attribute of the sys module. This path is a list, and if you want to add a new directory to the path, you just use the "append" method.

For instance, to add the directory /home/me/mypy to the path, just do:

import sys sys.path.append("/home/me/mypy")

chiurox
A: 

But where is the list stored? What is the difference between PATH, PYTHONPATH?