from time import sleep
import os
process_name = 'main.py'
def process_exists():
call = os.system('ps ax | grep %s' % process_name)
if not process_name in call:
return True
while True:
try:
a = process_exists()
if a != True :
os.system('python3 ' + process_name)
sleep(2)
except KeyboardInterrupt:
break
components=['{}'.format(intext)]
передаёт в аргумент components забавную конструкцию:['[four, one, two, inv, tho]']