Package dogtail :: Module logging :: Class TimeStamp
[hide private]
[frames] | no frames]

Class TimeStamp

source code

Generates timestamps tempfiles and log entries

Instance Methods [hide private]
 
__init__(self) source code
 
zeroPad(self, int, width=2)
Pads an integer 'int' with zeroes, up to width 'width'.
source code
 
fileStamp(self, filename, addTime=True)
Generates a filename stamp in the format of filename_YYYYMMDD-hhmmss.
source code
 
entryStamp(self)
Generates a logfile entry stamp of YYYY.MM.DD HH:MM:SS
source code
Method Details [hide private]

zeroPad(self, int, width=2)

source code 

Pads an integer 'int' with zeroes, up to width 'width'.

Returns a string.

It will not truncate. If you call zeroPad(100, 2), '100' will be returned.

fileStamp(self, filename, addTime=True)

source code 

Generates a filename stamp in the format of filename_YYYYMMDD-hhmmss. A format of filename_YYYYMMDD can be used instead by specifying addTime = False.