python and command shell on Windows

J

josu

Hi

I am trying to execute a windows command based on a shell by mean of
python. I have proven subprocess

test=subprocess.Popen
(['shell_command'],shell=True,stdin=PIPE,stdout=PIPE)

Initally, all seems ok, but, after seconds the python shell is frozen.

Does someone know alternative ways valid for windows OS?

Thanks in advance

josu
 
E

Eric_Dexter

Hi

I am trying to execute a windows command based on a shell by mean of
python. I have proven subprocess

test=subprocess.Popen
(['shell_command'],shell=True,stdin=PIPE,stdout=PIPE)

Initally, all seems ok, but, after seconds the python shell is frozen.

Does someone know alternative ways valid for windows OS?

Thanks in advance

josu
os.startfile() works you will find the pipe commands are different on
unix and windows anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top