Jump to content

My first python program: Leet-Timer


Joerg

Recommended Posts

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/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...