Dec-16-2017, 07:28 PM
this code has bugs:
the function print_wait uses hour as an argument.
inside that function, the following code:
cannot assign a value to an argument
In addition, the code uses sleep which stops execution of the script until timed out.
You'd be better off rewriting, and using sched: https://docs.python.org/2/library/sched.html
the function print_wait uses hour as an argument.
inside that function, the following code:
nxt += timedelta(hour = 3 )will cause an 'invalid keyword argument' error (if it ever gets executed) because you
cannot assign a value to an argument
In addition, the code uses sleep which stops execution of the script until timed out.
You'd be better off rewriting, and using sched: https://docs.python.org/2/library/sched.html