Joerg Posted July 11, 2008 Share 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 Link to comment Share on other sites More sharing options...
K1u Posted July 11, 2008 Share Posted July 11, 2008 Thats hot. Good job mate. Quote Link to comment Share on other sites More sharing options...
nicatronTg Posted July 12, 2008 Share 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 Link to comment Share on other sites More sharing options...
Joerg Posted July 12, 2008 Author Share Posted July 12, 2008 ToDo (help or tips appreciated): * Better way to update output than clear method * OS compatibility, portability * Compiling Quote Link to comment Share on other sites More sharing options...
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.