#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2008 Doug Hellmann All rights reserved. # """Time resolution. """ __version__ = "$Id$" #end_pymotw_header import datetime for m in [ 1, 0, 0.1, 0.6 ]: try: print '%02.1f :' % m, datetime.time(0, 0, 0, microsecond=m) except TypeError, err: print 'ERROR:', err