f



run command line on Windows without showing DOS console window


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
0
iMath
11/20/2013 2:44:52 PM
comp.lang.python 77058 articles. 6 followers. Post Follow

3 Replies
1596 Views

Similar Articles

[PageSpeed] 27

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
0
mail3050 (881)
11/20/2013 2:49:50 PM
Tim Golden wrote:

> 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"])

Complement: use .pyw extension for your main Python module (avoid Python 
opening a console).

A+

-- 
Laurent POINTAL - laurent.pointal@laposte.net

0
11/20/2013 9:35:11 PM
=E5=9C=A8 2013=E5=B9=B411=E6=9C=8820=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=89UTC=
+8=E4=B8=8B=E5=8D=8810=E6=97=B649=E5=88=8650=E7=A7=92=EF=BC=8CTim Golden=E5=
=86=99=E9=81=93=EF=BC=9A
> On 20/11/2013 14:44, iMath wrote:
>=20
> >=20
>=20
> >=20
>=20
> > is there anyway to run command line on Windows without showing DOS cons=
ole window ?
>=20
> >=20
>=20
> > can you use the following command line to give a little example ?
>=20
> >=20
>=20
> > wget -r -np -nd http://example.com/packages/
>=20
> >=20
>=20
> > the path to wget is C:\Program Files\GnuWin32\bin\wget.exe
>=20
> >=20
>=20
>=20
>=20
> subprocess.call(["wget", "-r", "-np", "-nd", "http://example.com"])
>=20
>=20
>=20
> TJG
Have you tried it ? the DOS console window still pops up?
but I found when shell=3DTrue ,the DOS console window doesn't pop up,anyone=
 can explain why ?
0
iMath
11/23/2013 4:13:53 PM
Reply: