473,325 Members | 2,805 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,325 software developers and data experts.

I want a program to repeat itself multiple times before stopping, how do i do this?

2
I have this program that an associate will input their ID# then it prints back saying (your associate ID# is XXX) then it will state what time it they clocked in/out--Ex: Your ID# is 101 and you left at 13:45:00
...the program also dumps their ID# and times into a seperate file so it can be logged and reviewed at any time.

My problem is once you run the program one time, it quits..then you must run module over again. How do i just keep it running for multiple hours at a time?

I'm using the python GUI and just clicking F5-key to run module and forget about the "While" function i have in the code i took it out...(Just for more information if needed)
Thank you, Colt
Attached Files
File Type: txt mycodeout.txt (588 Bytes, 635 views)
Feb 20 '11 #1
3 5372
dwblas
626 Expert 512MB
If I understand you correctly, use a while() loop in a second program. The second programs executes the first program using subprocess, so after an ID, etc. is entered it will exit the first program, loop back and ask for an ID again. A more straight forward way is to use a function, pass the output file handle to the function, and call the function within a while() loop.
Feb 20 '11 #2
bvdet
2,851 Expert Mod 2GB
Your code is a script that executes and ends. You are importing Tkinter, but not using it. You could write your GUI with Tkinter. The GUI could be designed with buttons and entry fields and could react to events without closing.
Feb 20 '11 #3
Colt
2
Thank you very much i believe i got it!
Feb 20 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Nick Li | last post by:
Hi, I am trying to print a value of a variable multiple times. For example, the value is "*" and I want to print it five times, like "*****". Can somebody show me a easy way to do it? Thanks...
1
by: Luther Miller | last post by:
I've created a web setup project that works great for installing an ASP.NET application to a virtual directory on a server. I'd like to be able to use the same setup program to install multiple...
22
by: Brett Romero | last post by:
If my UI app uses three DLLs and two of those DLLs reference something named utilities.dll, does the UI app load utilities.dll twice or does the compiler recognize what is going on and load...
6
by: yk | last post by:
Hi, Is it a technique available in html/javascript in order to display same image many many times on a same page? Because of a large page loading I am looking for a way not to have same...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
2
by: AMDRIT | last post by:
Hello Everyone, I am having an issue where an event appears to be fired repeatedly where I only expect it to be fired once. See below for objects and behaviors. I have a control that contains...
27
by: Neil | last post by:
Hello all! I wrote program with a array of pointers, and I suspect they are pointing at each other in the Do ...While loop. Something is messed up with the increment variable word. A program...
0
by: grbCPPUsr | last post by:
I am new to Python. I would like to use Python for the specialized purpose of dynamic expressions parsing & evaluation in my C++ application. I would like to encapsulate the expressions to be...
5
by: billa856 | last post by:
Hi, My project is in MS Access 2002. In that I want to open one form multiple times. I put one button on my main form. Now whenever I click on that button than form will be open. Now when I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.