473,322 Members | 1,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

os.system and flow control

Lad
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
Jul 18 '05 #1
3 1316
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
Jul 18 '05 #2
Lad
Peter L Hansen <pe***@engcorp.com> wrote in message news:<DN********************@powergate.ca>...
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
Jul 18 '05 #3

"Lad" <ex****@hope.cz> wrote in message
news:81*************************@posting.google.co m...
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') ???

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Chan | last post by:
Hi, I'm trying to use python to create GUI wizards, i.e. sequences of dialog boxes with <BACK and NEXT> buttons. Since I want to re-use some of the dialog boxes in different wizards, I want to...
11
by: Robert Bowen | last post by:
Hello all. I have been given mock-ups (in static HTML) of some pages for a site I am working on. The client would like these pages to look exactly as they do now. The problem is that the content is...
7
by: Microsoft News | last post by:
Hi all. Does id() xpath function work in System.XML? I have built dtd, schema, xdr for a simple xml which includes attributes definded as ID and IDREFS. Validation is occurring properly for all...
5
by: Miyra | last post by:
Hi. I'm working with an app that uses exceptions for control flow. These are code blocks where exceptions are thrown/caught regularly. A couple hundred exceptions occur per hour and they're caught...
9
by: Alvin Bruney [MVP] | last post by:
Exceptions must not be used to control program flow. I intend to show that this statement is flawed. In some instances, exceptions may be used to control program flow in ways that can lead to...
7
by: Dave | last post by:
Hi, I've read a few contradictory statements on how to do flow control between methods. Main problem is that I've seen recommendations (or "standards") to *not* use exceptions for flow control,...
17
by: tshad | last post by:
Many (if not most) have said that code-behind is best if working in teams - which does seem logical. How do you deal with the flow of the work? I have someone who is good at designing, but...
4
by: VB Programmer | last post by:
I have user controls that I'm going to place on the form. There could be from 0 - 20. I want the user to be able to resize the window and have the controls relocate automatically, but like FLOW...
15
by: c676228 | last post by:
Hi all, In traditional asp form, there is an action field in a form, any time the page is valid, after click the submit button, the next page comes up based on the value in the action field. In...
2
by: brianlum | last post by:
Hi, I have been looking for a good way to convert python code into a control flow graph. I know of Python functions that will convert an expression into an abstract syntax tree (i.e. ast =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.