[python-win32] want to leave DOS console at any target dir

Charlie charlie at sallyandcharlie.com
Thu Nov 22 10:57:26 CET 2007


Michel Claveau <mc <at> 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 DOS console at the desired directory location.

  Pretty close to what I was hoping for.

Charlie




More information about the python-win32 mailing list