#! /usr/bin/env python3 # def timestamp ( ): #*****************************************************************************80 # ## timestamp() prints the date as a timestamp. # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 21 August 2019 # # Author: # # John Burkardt # import time t = time.time ( ) print ( time.ctime ( t ) ) return def timestamp_test ( ): #*****************************************************************************80 # ## timestamp_test() tests timestamp(). # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 03 December 2014 # # Author: # # John Burkardt # import platform print ( '' ) print ( 'timestamp_test():' ) print ( ' Python version: %s' % ( platform.python_version ( ) ) ) print ( ' timestamp() prints the date as a timestamp.' ) print ( '' ) timestamp ( ) # # Terminate. # print ( '' ) print ( 'timestamp_test():' ) print ( ' Normal end of execution.' ) return if ( __name__ == '__main__' ): timestamp_test ( )