On Thu, 20 May 2010 16:57:40 -0700, Brendan Miller wrote: > I have a python script that sets up some environmental stuff. I would > then like to be able to change back to interactive mode and use that > environment. What's the best way to do that?
On most(?) Linux distros, `man python` is your friend. (Like all well- behaviour apps, python should come with a man page.) `python --help` is useful too, and will be platform independent. Both tell me that you want to pass -i as an option to enter the interactive interpreter after running a module or command: [st...@sylar ~]$ python -c "print 'hello world'; x = 2" hello world [st...@sylar ~]$ python -i -c "print 'hello world'; x = 2" hello world >>> x 2 You can also set an environment variable to force the same behaviour. See the help for details. -- Steven -- http://mail.python.org/mailman/listinfo/python-list