mirror of https://github.com/Justuser3310/jetwork/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
407 B
27 lines
407 B
5 months ago
|
#
|
||
|
# Установка/проверка статуса завершения
|
||
|
#
|
||
|
|
||
|
import os
|
||
|
|
||
|
if not os.path.exists('status'):
|
||
|
f = open('status', 'w')
|
||
|
f.write('work')
|
||
|
f.close()
|
||
|
|
||
|
def status_check():
|
||
|
f = open('status', 'r')
|
||
|
st = f.read()
|
||
|
if st == 'work':
|
||
|
return True
|
||
|
else:
|
||
|
return False
|
||
|
|
||
|
def status_set(st):
|
||
|
f = open('status', 'w')
|
||
|
if st == True:
|
||
|
f.write('work')
|
||
|
else:
|
||
|
f.write('stop')
|
||
|
f.close()
|