To run the program click on the Geany 'Build->Execute'
menu option, or press the F5
key. Enter a value of say 10 seconds to start with. If you see an error message instead read it carefully, then check all your typing, especially any string quotes and brackets. Fix the typo and run again. Repeat this debugging process until it runs correctly.
Execute the program a few times with different numbers of seconds. If you enter a big number and get bored waiting you can always stop the program by selecting Geany's 'Build->Stop'
menu option, pressing the F5
key again, or just closing the output window.
The Timer app can also be run from the command line in a terminal window. Open an new LXTerminal window and enter this command next to the '$'
prompt:
$ python ~/Desktop/Python/timer.py
Time to have some fun and personalise your app. Try changing the character that appears when the loop in running. Or replace the final message.
A post from my Learn Python on the Raspberry Pi tutorial.
No comments:
Post a Comment