ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved