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,
Michel Claveau mclaveau.com> writes:
>
> Hi!
>
> Try this:
> import os
> os.system('start "TITLE" "cmd /KCD /DD:\\Dev\\python"') #for dir:
> D:\\Dev\\python
>
> ("TITLE" is the title (yes!) of the window)
>
> @-salutations
>
> Michel Claveau
>
Thanks,
That launches a new DO
Hi!
Try this:
import os
os.system('start "TITLE" "cmd /KCD /DD:\\Dev\\python"') #for dir:
D:\\Dev\\python
("TITLE" is the title (yes!) of the window)
@-salutations
Michel Claveau
___
python-win32 mailing list
python-win32@python.org
htt
bob gailer alum.rpi.edu> writes:
>
> Charlie wrote:
> > When launching a python script from a DOS console,
> > I can not find a way to leave the DOS console at a working directory
> > other than the initial working directory.
> >
> Why do you want to do this? Might there be other approach
Charlie wrote:
> When launching a python script from a DOS console,
> I can not find a way to leave the DOS console at a working directory
> other than the initial working directory.
>
Why do you want to do this? Might there be other approaches?
__
> Date: Mon, 19 Nov 2007 02:18:12 + (UTC)
> From: Charlie <[EMAIL PROTECTED]>
> Subject: [python-win32] want to leave DOS console at any target dir
> To: python-win32@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=us-ascii
>
When launching a python script from a DOS console,
I can not find a way to leave the DOS console at a working directory
other than the initial working directory.
os.chdir only seems to work for the python script context, not the DOS context.
I guess this amounts to a work-around for no "os.fc