Is there anyway I can make my script execute one of my functions when Ctrl+c is hit when the script is running?
Ctrl+c
Sure.
try: # Your normal block of code except KeyboardInterrupt: # Your code which is executed when CTRL+C is pressed. finally: # Your code which is always executed.