Alright so my main goal in what I'm currently working on is to get a script file to reload itself (assume there is a trigger because there is one in place for it) whenever the code is updated. Right now I have scriptfilename.py and reload.py.
What I'm trying to do is to execute the reload.py file and after that is executed the program closes itself. After the reload.py file is called, it executes scriptfilename.py and close the reload.py file.
as I just typed the above, I realized that reload.py wouldn't get to be able to close itself because it cant get past the scriptfilename.py program which will be continuously running..
what is the best way to impliment a self update code for a python script file (NOT a module) after code has been changed? It would be put under a trigger which I'm able to trigger myself as the code is running.
so like for example
if trigger.activated==True:
#update the Scriptfilename.py file to run new code that's been put into it.
note: I'm using python 3.0 and I've been spending many hours googling on this vastly Lol
EDIT: actually nevermind on this, this can be deleted. I got what I needed.