John Lawrence wrote:
You can make a command use the current shell though if you use the '.'
command e.g.:
jl > cat env.sh
export TEST='hello'
jl > ./env.sh && env | grep TEST #Doesn't set TEST in parent shell
jl > . ./env.sh && env | grep TEST #Adding '. ' before the
command uses the same shell
TEST=hello
doesn't exactly work for Python scripts, though:
$ cat env.py
#!/usr/bin/env python
import os
os.environ["TEST"] = "hello"
$ . ./env.py && env | grep TEST
import: unable to open X server `'.
bash: os.environ[TEST]: command not found
</F>
--
http://mail.python.org/mailman/listinfo/python-list