os.system and flow control

Discussion in 'Python' started by Lad, Oct 14, 2004.

  1. Lad

    Lad Guest

    In my program I use
    os.popen2('notepad.exe IDPass.txt')
    to open IDPass.txt file in Notepad window. Users can edit this file
    but the problem is that if the program runs on Windows 98 , the
    program does not wait for closing of Notepad window but continues
    running with the next command after
    os.popen2('notepad.exe IDPass.txt').
    If the program runs on XP, the execution of my program is paused until
    I close the notepad window.
    How shall I force the WIndows 98 to pause the execution like WIndows
    Xp ?
    Thanks for help
    Lad
     
    Lad, Oct 14, 2004
    #1
    1. Advertising

  2. Lad wrote:
    > In my program I use
    > os.popen2('notepad.exe IDPass.txt')
    > to open IDPass.txt file in Notepad window. Users can edit this file
    > but the problem is that if the program runs on Windows 98 , the
    > program does not wait for closing of Notepad window but continues
    > running with the next command after
    > os.popen2('notepad.exe IDPass.txt').
    > If the program runs on XP, the execution of my program is paused until
    > I close the notepad window.
    > How shall I force the WIndows 98 to pause the execution like WIndows
    > Xp ?


    Odd, I recall this being asked recently. It wasn't you by
    any chance, was it?

    I believe the ultimate conclusion was that you should investigate
    the START command with an option of /WAIT.

    -Peter
     
    Peter L Hansen, Oct 14, 2004
    #2
    1. Advertising

  3. Lad

    Lad Guest

    Peter L Hansen <> wrote in message news:<>...
    > Lad wrote:
    > > In my program I use
    > > os.popen2('notepad.exe IDPass.txt')
    > > to open IDPass.txt file in Notepad window. Users can edit this file
    > > but the problem is that if the program runs on Windows 98 , the
    > > program does not wait for closing of Notepad window but continues
    > > running with the next command after
    > > os.popen2('notepad.exe IDPass.txt').
    > > If the program runs on XP, the execution of my program is paused until
    > > I close the notepad window.
    > > How shall I force the WIndows 98 to pause the execution like WIndows
    > > Xp ?

    >
    > Odd, I recall this being asked recently. It wasn't you by
    > any chance, was it?
    >
    > I believe the ultimate conclusion was that you should investigate
    > the START command with an option of /WAIT.
    >

    Yes, Peter
    I already asked and you already tried to help but your solution did
    not work. Can you please give me an example how to use START with
    /WAIT option.
    Thanks a lot
    Lad
     
    Lad, Oct 15, 2004
    #3
  4. "Lad" <> wrote in message
    news:...
    > > I believe the ultimate conclusion was that you should investigate
    > > the START command with an option of /WAIT.

    > I already asked and you already tried to help but your solution did
    > not work. Can you please give me an example how to use START with
    > /WAIT option.


    os.popen2('start /wait notepad.exe IDPass.txt') ???
     
    George Kinney, Oct 15, 2004
    #4
    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. Coleen
    Replies:
    2
    Views:
    1,373
    Coleen
    Aug 31, 2006
  2. Shawn
    Replies:
    3
    Views:
    336
    Oliver Wong
    Nov 29, 2006
  3. Steven T. Hatton

    Types as tags and RTTI for flow control

    Steven T. Hatton, Mar 2, 2006, in forum: C++
    Replies:
    3
    Views:
    309
    Steven T. Hatton
    Mar 6, 2006
  4. Jack Dowson
    Replies:
    0
    Views:
    468
    Jack Dowson
    May 7, 2007
  5. kj
    Replies:
    4
    Views:
    654
    Bearophile
    Sep 26, 2009
Loading...

Share This Page