programmatically manipulation environment variables of the calling shell

Michal 'vorner' Vaner vorner at ucw.cz
Mon Mar 12 06:55:58 EDT 2007


Hello,

On Mon, Mar 12, 2007 at 11:40:11AM +0100, Diez B. Roggisch wrote:
> Maxim Veksler wrote:
> > I'm trying to write a python script that would allow me to manipulate
> > shell variables of the calling shell. I'm trying to write some logic
> > that would know to add LD_LIBRARY_PATH to the users environment.
> 
> It's not possible, OS restrictions - you are not allowed to alter the
> environment of a parent process. 

Actually, you are able to modify only your own environment (and call a
new process with any possible environment). And the restrictions seem to
me rather technical - the process would have to change its behaviour
each time it changes.

With regards

-- 
grep me no patterns and I'll tell you no lines.

Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20070312/1ad6ec07/attachment.sig>


More information about the Python-list mailing list