python Programming Glossary: time.ctime
How do you get a directory listing sorted by creation date in python? http://stackoverflow.com/questions/168409/how-do-you-get-a-directory-listing-sorted-by-creation-date-in-python a modification date for cdate path in sorted entries print time.ctime cdate os.path.basename path Example python stat_creation_date.py..
How to get file creation & modification date/times in Python? http://stackoverflow.com/questions/237079/how-to-get-file-creation-modification-date-times-in-python functions import os.path time print last modified s time.ctime os.path.getmtime file print created s time.ctime os.path.getctime.. s time.ctime os.path.getmtime file print created s time.ctime os.path.getctime file Your other option is to use os.stat import.. size atime mtime ctime os.stat file print last modified s time.ctime mtime Note ctime does not refer to creation time on nix systems..
How to limit traffic using multicast over localhost http://stackoverflow.com/questions/2879046/how-to-limit-traffic-using-multicast-over-localhost 127.0.0.1 while 1 pkt Hello host 1 time 0 .format time.ctime platform.node print SEND to 0 data 1 .format addr pkt r sendSock.sendto..
Textually diffing JSON http://stackoverflow.com/questions/4599456/textually-diffing-json times are normally expressed in the format returned by time.ctime . Example for line in unified_diff 'one two three four'.split..
Efficient Python Daemon http://stackoverflow.com/questions/4637420/efficient-python-daemon open tmp current_time.txt w as f f.write The time is now time.ctime def run while True time.sleep 60 do_something if __name__ __main__..
Executing periodic actions in Python http://stackoverflow.com/questions/8600161/executing-periodic-actions-in-python being blocked. import time threading def foo ... print time.ctime ... threading.Timer 10 foo .start ... foo Thu Dec 22 14 46 08..
|