×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    27

    File Info Detail

    Hi all!
    I wanna obtain from a file, for example e:\images\prova.jpg
    the attributes of 'date', 'hour', 'kb size'...
    How i can do it?
    Thanx bye

  2. #2
    Registered User
    Join Date
    Feb 2006
    Location
    Helsinki, Finland
    Posts
    168

    Re: File Info Detail

    To do that you need to use the "os" module:

    Code:
    from os import *
    
    statinfo = stat('e:\images\prova.jpg') #store the info as statinfo
    
    size = statinfo.st_size #size in bytes
    mtime = statinfo.st_mtime #when it was modified last (in the unix time stamp format)
    ctime = statinfo.st_mtime #when it was created (in the unix time stamp format)
    more info at:http://docs.python.org/lib/os-file-dir.html

    -Richard
    Nokia E66
    PyS60 1.4.4 final

  3. #3
    Registered User
    Join Date
    Apr 2007
    Posts
    27

    Re: File Info Detail

    Thanx!!!

Similar Threads

  1. Mobile Virus Info and Solution
    By kunalshastry in forum General Development Questions
    Replies: 16
    Last Post: 2007-08-07, 11:12
  2. Tips on using NDS 1.1
    By mitts in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2006-01-18, 16:07
  3. sending header info for .3gp file fails
    By stoem in forum Digital Rights Management & Content Downloading
    Replies: 0
    Last Post: 2004-03-01, 09:01
  4. Series 60 SDK Appwizard on windows xp
    By moonjoor in forum Symbian Tools & SDKs
    Replies: 15
    Last Post: 2003-12-24, 10:22
  5. Replies: 0
    Last Post: 2002-11-19, 08:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×