python and command shell on Windows

Discussion in 'Python' started by josu, Dec 16, 2009.

  1. josu

    josu Guest

    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
    josu, Dec 16, 2009
    #1
    1. Advertising

  2. josu

    Guest

    On Dec 16, 11:58 am, josu <> wrote:
    > 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.
    , Dec 16, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    5,695
    Jonathan Bromley
    Feb 18, 2005
  2. Replies:
    4
    Views:
    1,705
    Terry Hancock
    Apr 23, 2005
  3. Donald Duck

    Best command for running shell command

    Donald Duck, Jul 11, 2006, in forum: Python
    Replies:
    3
    Views:
    401
    iapain
    Jul 11, 2006
  4. Christian Heimes
    Replies:
    0
    Views:
    597
    Christian Heimes
    Feb 27, 2008
  5. Gerardo Herzig
    Replies:
    1
    Views:
    1,074
    Philipp Pagel
    Feb 27, 2008
Loading...

Share This Page