irIl 2005-12-18, Andy B. <[EMAIL PROTECTED]> ha scritto: > I've got a python utility that I want to change my shell's current > directory based on criteria it finds. I've scoured google and the > python cookbook and can't seem to figure out if this is even possible. > So far, all my attempts have changed the current python session only. > Am I going to have to wrap this in a shell script? > > % pwd > /var/tmp > % myutil.py > # do some stuff and cd to '/var/log' > % pwd > /var/log
Just look in the library: import os os.chdir("path") -- Lawrence - http://www.oluyede.org/blog "Anyone can freely use whatever he wants but the light at the end of the tunnel for most of his problems is Python" -- http://mail.python.org/mailman/listinfo/python-list