You should rename it to .py
and watch the console output.
Or, even better, set up logging of unhandled exceptions (see below). In general, you must use logging to report on the script's progress if it's going to run unattended: there's simply no other way for you to know what is happening with it!
E.g. when the script starts a very long wait, you can report at which moment it starts waiting and for how long - that will clarify things for you.
The following is how I set up logging in my scripts that are to be run in background for extended time:
# set up logging #####################################
import sys,logging,logging.handlers,os.path
logfile = os.path.splitext(os.path.basename(sys.argv[0]))[0]+".log"
l = logging.getLogger()
l.setLevel(logging.DEBUG)
f = logging.Formatter('%(asctime)s %(process)d:%(thread)d %(name)s %(levelname)-8s %(message)s')
h=logging.StreamHandler(sys.stdout)
h.setLevel(logging.NOTSET)
h.setFormatter(f)
l.addHandler(h)
h=logging.handlers.RotatingFileHandler(logfile,maxBytes=1024**2,backupCount=1)
h.setLevel(logging.NOTSET)
h.setFormatter(f)
l.addHandler(h)
del h,f
#hook to log unhandled exceptions
def excepthook(type,value,traceback):
logging.error("Unhandled exception occured",exc_info=(type,value,traceback))
#Don't need another copy of traceback on stderr
if old_excepthook!=sys.__excepthook__:
old_excepthook(type,value,traceback)
old_excepthook = sys.excepthook
sys.excepthook = excepthook
del excepthook,logfile
# ####################################################