Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb1aeb0

Browse files
committed
updated the environment variables FAQ
svn path=/trunk/matplotlib/; revision=5440
1 parent 068eada commit fb1aeb0

1 file changed

Lines changed: 62 additions & 7 deletions

File tree

doc/faq/environment_variables_faq.rst

Lines changed: 62 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,77 @@
44
Environment Variables
55
*********************
66

7+
.. envvar:: HOME
8+
9+
The user's home directory. On linux, :envvar:`~ <HOME>` is shorthand for :envvar:`HOME`.
10+
711
.. envvar:: PATH
812

913
The list of directories searched to find executable programs
1014

1115
.. envvar:: PYTHONPATH
1216

13-
The list of directories that is searched to find Python packages and modules
17+
The list of directories that is added to Python's standard search list when
18+
importing packages and modules
19+
20+
21+
Setting Environment Variables in Linux
22+
======================================
23+
24+
To list the current value of :envvar:`PYTHONPATH`, which may be empty, try::
25+
26+
echo $PYTHONPATH
27+
28+
The procedure for setting environment variables in depends on what your default
29+
shell is. BASH seems to be the most common, but CSH is also common. You
30+
should be able to determine which by running at the command prompt::
31+
32+
echo $SHELL
33+
34+
35+
BASH/KSH
36+
--------
37+
38+
To create a new environment variable::
39+
40+
export PYTHONPATH=~/Python
41+
42+
To prepend to an existing environment variable::
43+
44+
export PATH=~/bin:${PATH}
45+
46+
The search order may be important to you, do you want `~/bin` to be searched
47+
first or last? To append to an existing environment variable::
48+
49+
export PATH=${PATH}:~/bin
50+
51+
To make your changes available in the future, add the commands to your
52+
`~/.bashrc` file.
53+
54+
55+
CSH/TCSH
56+
--------
57+
58+
To create a new environment variable::
59+
60+
setenv PYTHONPATH ~/Python
61+
62+
To prepend to an existing environment variable::
63+
64+
setenv PATH ~/bin:${PATH}
1465

66+
The search order may be important to you, do you want `~/bin` to be searched
67+
first or last? To append to an existing environment variable::
1568

16-
Setting Environment Variables
17-
=============================
69+
setenv PATH ${PATH}:~/bin
1870

19-
Linux/OS-X
20-
----------
71+
To make your changes available in the future, add the commands to your
72+
`~/.cshrc` file.
2173

2274

75+
Setting Environment Variables in Windows
76+
========================================
2377

24-
Windows
25-
-------
78+
Go to the Windows start menu, select `Control Panel`, then select the `System`
79+
icon, click the `Advanced` tab, and select the `Environment Variables`
80+
button. You can edit or add to the `user variables`.

0 commit comments

Comments
 (0)