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

Class TimeStamp

source code

object --+
         |
        TimeStamp

Generates timestamps tempfiles and log entries

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
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

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

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.