Answer the question
In order to leave comments, you need to log in
Restarting a python script from a specific line?
There is the following task: to restart the python script from a certain line - skipping those that have already worked out before. If we generalize the task - without importing part of the code as a module, without breaking it into functions - is it possible to do the following:
statement_1
statement_2
statement_3
statement_4
statement_5
statement_6
Answer the question
In order to leave comments, you need to log in
No, it won't. Example:
a = 1
b = 2
print(a+b)
Can. Save the state to a file. Restart the script. After starting, check the status and start from the right place.
You want to do something that looks like a breakpoint, but first?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question