run command line on Windows without showing DOS console window

iMath redstone-cold at 163.com
Sat Nov 23 17:13:53 CET 2013


在 2013年11月20日星期三UTC+8下午10时49分50秒,Tim Golden写道:
> On 20/11/2013 14:44, iMath wrote:
> 
> > 
> 
> > 
> 
> > is there anyway to run command line on Windows without showing DOS console window ?
> 
> > 
> 
> > can you use the following command line to give a little example ?
> 
> > 
> 
> > wget -r -np -nd http://example.com/packages/
> 
> > 
> 
> > the path to wget is C:\Program Files\GnuWin32\bin\wget.exe
> 
> > 
> 
> 
> 
> subprocess.call(["wget", "-r", "-np", "-nd", "http://example.com"])
> 
> 
> 
> TJG
Have you tried it ? the DOS console window still pops up?
but I found when shell=True ,the DOS console window doesn't pop up,anyone can explain why ?



More information about the Python-list mailing list