Environment Variable

2005-07-11 Thread tuxlover
Is it possible to set an environment variable from inside the python
script which will be retained after the script exits.

If I use the following code:

import os
os.putvar("name", "tuxlover")

the enivironment variable name is visible to only the sub-process
created by os.system and os.popen. But as soon as the python script
vanishes, the environment variable "name" is gone.

What I am wondering is that is it possible to set a environment
variable from inside a python script, and then access it (say, echo
$name from the shell) after the python script exits.

Thanks
Tuxlover

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Environment Variable

2005-07-11 Thread tuxlover
Sorry for posting twice.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: read output and store in file

2005-07-11 Thread tuxlover
use os.path.walk() or os.walk()

Tuxlover

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Environment Variable

2005-07-12 Thread tuxlover
No, the replies from Grant's and Sybren's do answer my question. I
posted twice because my browser locked itself up, and I ended up typing
twice :(

-- 
http://mail.python.org/mailman/listinfo/python-list


python parser

2005-07-12 Thread tuxlover
Hello everyone

I have to write a verilog parser in python for a class project. I was
wondering if all you folks could advise me on choosing the right python
parser module. I am not comfortable with lex/yacc and as a result find
myself strugging with any module which use lex/yacc syntax/philosophy.
pyparser looks good to me, but before I dive into it, I would really
appreciate feedback from members of this group

Thanks
Tuxlover

-- 
http://mail.python.org/mailman/listinfo/python-list