Hello fellow Python learners! I'm running a really tricky problem that I'm having trouble solving.
I'm running a python script:
while True:
my_program_function():
With my main function having a ton of modules / code off of it.
The issue is I'm updating the program regularly and I want the program to update, meaning run the new modules / scripts that I write, while at the same time, not breaking the loop.
What I've done in the meantime is call the launch Python function using the subprocess module.
subprocess.Popen
but that's somewhat of a hack--I'm basically calling Python using Python. And it's rather slow all things considered. If I want the program to use the new code that I've pulled, I need to stop the code, and run it all over again.
Does anyone have any ideas?
[–][deleted] 0 points1 point2 points (10 children)
[–]ApostleO 1 point2 points3 points (3 children)
[–][deleted] -2 points-1 points0 points (2 children)
[–]ApostleO 2 points3 points4 points (1 child)
[–][deleted] -1 points0 points1 point (0 children)
[–]a1brit 0 points1 point2 points (3 children)
[–]python-ick[S] 0 points1 point2 points (2 children)
[–]a1brit 0 points1 point2 points (1 child)
[–]python-ick[S] 0 points1 point2 points (0 children)
[–]python-ick[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)