Sunday, September 27, 2009

Python unique time string

Because this is always handy and I always seem to forget:

>>> import time
>>> str(time.time()).split('.')[0]

Useful for generating filenames based on the time etc.

No comments:

Post a Comment