Embedding setenv
Emile van Sebille
emile at fenx.com
Thu Feb 22 09:45:46 EST 2001
More information about the Python-list mailing list
Thu Feb 22 09:45:46 EST 2001
- Previous message (by thread): XML Module problems
- Next message (by thread): Embedding setenv
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"O'Rourke Clodagh-corour01" <corour01 at motorola.com> wrote in message news:mailman.982851124.2766.python-list at python.org... > > >>I've tried os.system("setenv VARIABLE value") > >>But I get: sh: setenv: not found > > > >n general, you can't do this. setenv (in csh) is a builtin, and doesn't > >xist in /bin/sh or /bin/bash > >t all. Are you trying to set variables in your parent processes' > >nvironment? Can't do that in > >nix, period. If you are trying to set your own environment, including > >ontrolling the environment > >o future child processes, use os.environ, which is a mapping > >dictionary-like object): > > import os > os.environ['VARIABLE'] = 'value' > this works for me... > > I'm trying to set environment variables in a GSM network environment I tried > > os.environ['VARIABLE'] = 'value' > > And I got..... > > SyntaxError: can't assign to function call > gotta be something else going on... > I'm working on putting a front end on the Network-Controller Environment variables reading data to/from Informix and setting the environment. > > If I can't do this directly from the python back end of the application, I might have to write the variables/values to another script and keep the setenv stuff separate.... > > Thanks, > Clodagh. > I'm not sure it'll do what you want it to do, but it certainly does what you say you're doing... -- Emile van Sebille emile at fenx.com -------------------
- Previous message (by thread): XML Module problems
- Next message (by thread): Embedding setenv
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list