In bash, you simply prefix a command with one or more XXX=”YYY” pairs, e.g.
$ A="B" X="Y" python print_env.py
...
A=B
X=Y
The code for print_env.py:
import os for ev in os.environ: print "{0}={1}".format(ev, os.environ[ev])
trying stuff with code
In bash, you simply prefix a command with one or more XXX=”YYY” pairs, e.g.
$ A="B" X="Y" python print_env.py
...
A=B
X=Y
The code for print_env.py:
import os for ev in os.environ: print "{0}={1}".format(ev, os.environ[ev])
Leave a Reply
You must be logged in to post a comment.