Re: Keeping os context possible? Re: Python a good thing for sysadmins ?
by Donn Cave other posts by this author
Sep 26 2001 5:15AM messages near this date
Re: scanf style parsing
|
Embeding Python & Dynamic Callbacks
Quoth Magnus Lycka <magnus@[...].se> :
...
| Sorry, you're right about the spawned process of course.
| In general...although you can source shell files to avoid
| spawning a new shell, right?
|
| Anyway, I didn't really check, but I guess that the db2
| command sets an environment variable in the environment of
| the shell where the command is invoked. (However that is
| done, but I guess there is a C call for that.)
|
| So if you run
| $ db2 login bla bla bla
|
| there will probably be something like below which wasn't there before
|
| $ echo $DB2_SESSION_ID (just guessing here)
| 123123123121
"db2" could do that only if it were a shell alias or function.
In general, your process environment is safe from the commands
you run, they can't touch it, and that applies to python programs.
Donn Cave, donn@[...].com
--
http://mail.python.org/mailman/listinfo/python-list
|