Python Forum

Full Version: How to restart Python after input change
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

A nooby here :-)

I have a python .py file that gets its time to start and end its function, from a text file.

The .py file is manually initiated in a Dos box on Win 10 1909.

I was wondering how I should correctly restart the script when I make a time change in the text file.

This what I am doing..
Ctrl C to end the running py script in the Dos box
close the Dos box
Make the change in the text file, save it
Open the Dis box.. Cmd
Start the py file and it does show the correct time to start the function.

Is this correct or should I not have to do as much or do more in case there is a cache etc.

As I said.. a nooby.

Thank you

oz

also...While the script is running, is it okay to leave the Dos box open, as it shows the time of the next function start in the text file? Or should I close it?
Any help here please?

Summary..

When I manually stop a script Ctrl C, do I have to close the Dos box to execute the stop, or can I just start the script again when ready?
Pull up the task manager. Do you see the Windows Command Processor count go up when you start your python program? Does it go back down when you stop it using Ctrl C? If so, you are stopping the process.

Does that answer your question?
Thank you, yes that will show me whether it is or is not going.