S
stephen_b
Can someone let me know why this won't work? Thanks.
'\n'
Thanks.
Stephen
'\n'
Thanks.
Stephen
stephen_b said:Can someone let me know why this won't work? Thanks.
'\n'
Thanks.
Stephen
James Stroud said:stephen_b said:Can someone let me know why this won't work? Thanks.
'\n'
Python starts a new shell for each command, so your environment variable
is lost. You probably want this, which makes the variable "permanent".
py> import os
py> os.environ['asdfasdf'] = 'hello'
py> os.popen('echo $asdfasdf').read()
'hello\n'
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.