View Single Post
zvogt's Avatar
Posts: 118 | Thanked: 67 times | Joined on Dec 2009 @ Saint Louis, MO, USA
#39
So I'm not a python guy, but just a couple minutes on google turned up the strftime method. it seems like something like:
text = self.time.strftime("%X")
would be simpler than the brute force string manipulation I'm seeing in the current clocks/ code.
At the bottom of this page: http://docs.python.org/library/datetime.html is a table showing all of the valid format options.

I actually think it would be cool if the interface would allow the user to input a custom format string using the arguments from that table, and would just render that input as a custom clock.
 

The Following 2 Users Say Thank You to zvogt For This Useful Post: