So I know how to execute a Python file within another Python file, exec(open('file.py').read())
But the file that I want to loop has a while(True):
loop within the file. What I want to do is loop the opening of the file containing the while true loop, while having that file run in the background.
The Opening Code:
loopCount=1
maxCount=100
while(loopcount<=maxCount):
exec(open('whileTrue.py').read())
I would think that you would do something like this, but instead of opening the file, allowing the file to run in the background, and opening the file again, etc; the code opens the file once then has the file run without opening the next file until after the file has been closed.
Any help with this is greatly appreciated.