×

Discussion Board

Results 1 to 6 of 6

Thread: Files

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    18

    Files

    How to open, read, write and delete text files using python in mobile applications?
    Nimmy

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Files


  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    18

    Re: Files

    Thanks Gargi Das.......... But i want to know how to open a file in a mobile's folder...?
    Nimmy

  4. #4
    Registered User
    Join Date
    Apr 2009
    Posts
    166

    Re: Files

    just change the path :P

    c:\\ for phone memory
    e:\\ for mini/micro SD card
    d:\\ for ram
    z:\\ for ROM

    and then use it like this:

    e:\\documents\\txt_file.txt

    its simple

  5. #5
    Registered User
    Join Date
    Feb 2010
    Posts
    18

    Re: Files

    Thanks a lot AJ..........
    Nimmy

  6. #6
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: Files

    And you can see the drive list using e32.drive_list():

    Code:
    import e32
    for d in e32.drive_list():
        print "Drive: ",d
    Moreover, use os.path.join when joining paths, it avoids errors like to forget to put double slashes (\\).

    Code:
    >>> import os
    >>> os.path.join(u"e:",u"test",u"file.txt")
    u'e:\test\file.txt'

Similar Threads

  1. Delete temporary files from Phone Memory
    By dasshantanu in forum Symbian
    Replies: 3
    Last Post: 2009-06-09, 05:44
  2. STUCK with imaginary image files
    By lvanton in forum General Development Questions
    Replies: 1
    Last Post: 2009-05-21, 07:09
  3. A better way to read several Xml Files
    By Fye_08 in forum Mobile Java General
    Replies: 4
    Last Post: 2009-04-22, 09:28
  4. error when browsing files
    By Scolpy in forum Symbian
    Replies: 17
    Last Post: 2008-11-10, 23:24
  5. Problem packaging and deploying files
    By raffaelbechara in forum Symbian
    Replies: 4
    Last Post: 2008-10-24, 14:53

Posting Permissions

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