Clear exit after using ctrl + c

This commit is contained in:
CronyAkatsuki 2021-07-10 17:47:49 +02:00
parent 9e2ddbe178
commit 653a85138b

12
adl.py
View File

@ -1,4 +1,5 @@
import os, subprocess, sys, argparse
import os, subprocess, sys, argparse, signal
from time import sleep
# argument parser
ap = argparse.ArgumentParser()
@ -140,9 +141,9 @@ def get_score(choice):
choice = choice[68:71]
return choice
# watch anime
# watch animes
def watch(cmd):
os.system(cmd)
subprocess.run(cmd)
# next episode
def next_episode(title,episode):
@ -276,6 +277,11 @@ def wanna_update_title_after_watch(title, episode, score):
elif yn == "N" or yn == "n":
break
def interupt_command(signum, frame):
exit_adl()
signal.signal(signal.SIGINT, interupt_command)
# choose what to do with episode
def choose_episode():
subprocess.call("cls", shell=True)