Suppose I want to edit
PYTHONPATH = /home/CURRENT_USER/
- How do I have a variable that will automatically fill in the current user?
- What about hostname?
- Aren't these environment variables?
Also, the user's home directory is not necessarily in
If you wish to see all of your environmental variables available, use the following command:
Remember case sensitivity, for hostname you'll need $HOSTNAME, and $USER
Another approach is to add a call to
However since Python 2.6 you probably don't need to do either, because
See PEP370 for details.