python subprocess set shell var. and then run command - how?

Viewed 14505

I need to do this:

$ export PYRO_HMAC_KEY=123
$ python -m Pyro4.naming

So, i found that the second one is possible to do with

subprocess.Popen(['python','-m','Pyro4.naming'])

but how export shell variable before that?

3 Answers
Related