Public Member Functions | |
def | __init__ |
def | __str__ |
def | localtime |
Definition at line 6 of file TimeStamp.py.
def TimeStamp::TimeStamp::__init__ | ( | self, | ||
anObject = None | ||||
) |
Definition at line 8 of file TimeStamp.py.
00008 : 00009 00010 # convert integer to float-seconds 00011 # returns time in format "%y-%m-%d %H:%M:%S" 00012 00013 if anObject == "p" and globals.quiet != 0: 00014 self._timestamp = " " 00015 elif isinstance( anObject, types.StringType ): 00016 self._timestamp = anObject 00017 else: 00018 self._timestamp = self.localtime( ) 00019 def __str__( self ):
def TimeStamp::TimeStamp::__str__ | ( | self | ) |
Definition at line 20 of file TimeStamp.py.
00020 : 00021 00022 # return cached timestamp 00023 00024 return self._timestamp 00025 def localtime( self ):
def TimeStamp::TimeStamp::localtime | ( | self | ) |
Definition at line 26 of file TimeStamp.py.
00026 : 00027 00028 t = time.localtime( time.time( ) ) 00029 s = time.strftime( "%y-%m-%d %H:%M:%S", t ) 00030 00031 return s 00032 if __name__ == '__main__':