Hello.I have a python code(name: test.py).
I run a loop printing a value every 1 sec. and when the value reach number '5', then I want to download a python file (name: test.py) from my github.
The filename that just downloaded is test.py.1
The code for test.py.1 is the same as the previous one(1st test.py program) except that the number now is not '5' ,but '20' ,because I want 20 sec. in order to upload another file on github, so that test.py.1 code download it when value reach number '20' as I said before.
The filename that just downloaded is test.py.2
So,the problem is that when I download the file test.py.2 the code is not the one Ι uploaded, but is the same as test.py.1 (test.py.2 is the same as test.py.1)
Here, are the 3 programs:
What I have tried:
Program #1 (test.py)
import os , time , sys
i = 1
while(1):
if(i == 5):
os.system("wget 'https://github.com/NickGkoutzas/autoClicker/raw/main/test.py'")
time.sleep(2)
os.system("python3 test.py.1")
else:
print(str(i))
time.sleep(1)
i += 1
Program #2 (test.py.1)
import os , time , sys
i = 1
while(1):
if(i == 20):
os.system("wget 'https://github.com/NickGkoutzas/autoClicker/raw/main/test.py'")
time.sleep(2)
os.system("python3 test.py.2")
else:
print("helloooooo " + str(i))
time.sleep(1)
i += 1
Program #3 (test.py.2)
import os , sys , time
i=1
while(1):
print("KKKKKKKKKKKKKKKKKKK -> " + str(i))
time.sleep(1)
i += 1
What is the problem?