Joerg Posted July 11, 2008 Posted July 11, 2008 Woo, first python program: The Leet-Timer It displays the passed time since 13:37:00; you can see 13:37 as noon if you would like to. I'm sure there can be done alot about the style of programming, so I would like to hear some opinions about it (especially the while-loop). #! /usr/bin/python # Leet-Timer # First test program # import used libraries or commands from time import tzset import os from time import strftime import time ## ## ## ## os.environ['TZ'] = 'LEET+13:37LEETDST+11:37' # sets a new timezone and define its offset tzset() # applys the new timezone # displays and updates the current leet time [VERY DIRTY] while '42' > '23': os.system("clear") # uses the shell command "clear" to clear the command shell print(strftime('%H:%M:%S')) # prints the current leet time time.sleep(0.5) # sleep half a second then continue quit http://ubuntuusers.de/paste/390308/ Quote
nicatronTg Posted July 12, 2008 Posted July 12, 2008 This community needs a database of all community created programs....I cant manage them all on my desktop at once! Quote
Joerg Posted July 12, 2008 Author Posted July 12, 2008 ToDo (help or tips appreciated): * Better way to update output than clear method * OS compatibility, portability * Compiling Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.