On 22/11/2007, Charlie <[EMAIL PROTECTED]> wrote: > That launches a new DOS console at the desired directory location. > > Pretty close to what I was hoping for.
You can't really get much closer. A child process (which is what your Python program is) cannot alter the environment (env variables, current directory, wtc) of its parent process (the CMD shell which started the Python program). [There may be extremely hacky low-level ways round this, but it's true is essence]. Unlike Python, batch files can do this, as they are run by the CMD shell itself, rather than as a subprocess. In effect, they have special abilities not available to normal programs. Paul. PS You can do something similar by using a BAT file to run a Python program which prints a CD command that the BAT file reads and executes, but that comes under my definition of "hacky" :-) _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32