Apr-06-2018, 09:45 PM
I have got a menu written in Python:
How can I terminate running function1?
if __name__ == '__main__': print_menu() # display the menu choice = input("Type number") if choice == 1: function1() # function, which calls the other functions if choice == 2: function2()I had run function1 and before it reached the end I had stopped the script in terminal with Ctrl+C (I use Ubuntu 16.04). After it I want to check function2, but when I am running the script with menu, the menu is not displayed and it goes immediately to function1. It looks like the function1 is running whole the time, but when I check processes with ps ax there is not my script.
How can I terminate running function1?