[code.view]

[top] / python / PyMOTW / ospath / ospath_properties.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2008 Doug Hellmann All rights reserved.
     #
     """Find attributes of a file other than its name.
     """
     
     __version__ = "$Id$"
     #end_pymotw_header
     
     import os.path
     import time
     
     print 'File         :', __file__
     print 'Access time  :', time.ctime(os.path.getatime(__file__))
     print 'Modified time:', time.ctime(os.path.getmtime(__file__))
     print 'Change time  :', time.ctime(os.path.getctime(__file__))
     print 'Size         :', os.path.getsize(__file__)

[top] / python / PyMOTW / ospath / ospath_properties.py

contact | logmethods.com