No idea what I'm committing here, but it goes on github

This commit is contained in:
2021-12-14 14:15:20 +02:00
parent 30bd0148eb
commit f2e4bbf681
7 changed files with 187 additions and 55 deletions

21
DoubleReset.py Normal file
View File

@@ -0,0 +1,21 @@
from time import sleep
import os
def DoubleReset(Time=5,File="doublereset.txt"):
try:
a=open(File)
Check=a.read().strip()
a.close()
if Check == '1':
os.remove(File)
return True
except OSError:
pass
a=open(File,"w")
a.write("1")
a.close()
sleep(Time)
os.remove(File)
return False