I\'ve been learning Python, I\'m working in 2.7.3, and I\'m trying to understand import
statements.
The documentation says that when you attemp
PYTHONPATH
is not defined on your system. That means all you see in sys.path
except for
''
is "the installation-dependent default."
Environment variables characterize the environment, not a process. However, you can tweak them when starting a process by using, say, Linux env
command. That basically means that the process will run in a different environment. The "how if works" part of your question can have platform-dependent answers. However, I don't think you can "tell where a persistent environment variable is stored", if you mean a file. Environment variables can be set in any of the files that are executed at some point (usually at startup) or just in the command line.