A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| #!/usr/bin/python | |
| def nextbus(where = 'guess', nbus = 5, walking_time = 3): | |
| """ | |
| tells you when the next bus is from home or to uni | |
| where: 'h'/'u'/'guess': home, uni, or try to guess based on wifi connection name | |
| walking_time: don't show buses less than n mins from now | |
| nbus: show next n buses |