7 Replies - 2338 Views - Last Post: 08 July 2010 - 06:52 AM Rate Topic: -----

#1 draike09  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 19
  • Joined: 21-May 10

Help how to create new folder in mobile using python

Posted 05 July 2010 - 01:35 AM

Help on how to create new folder in mobile using python.. Can someone help me.or give some example source code in python that can create new folder..the user will be the one that will input the name of the folder they want to create..generally speaking manually create folder..thanks..
Is This A Good Question/Topic? 0
  • +

Replies To: Help how to create new folder in mobile using python

#2 Motoma  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 452
  • View blog
  • Posts: 796
  • Joined: 08-June 10

Re: Help how to create new folder in mobile using python

Posted 05 July 2010 - 06:10 PM

You'll want to look at Python's mkdir() function.

This post has been edited by Motoma: 05 July 2010 - 06:11 PM

Was This Post Helpful? 0
  • +
  • -

#3 draike09  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 19
  • Joined: 21-May 10

Re: Help how to create new folder in mobile using python

Posted 06 July 2010 - 07:56 AM

yes i know that sir.. but i dont know how to use it.. sir an example code will be helpul
Was This Post Helpful? 0
  • +
  • -

#4 Motoma  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 452
  • View blog
  • Posts: 796
  • Joined: 08-June 10

Re: Help how to create new folder in mobile using python

Posted 06 July 2010 - 08:56 AM

View Postdraike09, on 06 July 2010 - 08:56 AM, said:

yes i know that sir.. but i dont know how to use it.. sir an example code will be helpul


Hrm...

import os
os.mkdir('newdirectory')
os.mkdir('/path/to/anotherdirectory')
os.mkdir('C:\\A\\Long\\Path\\To\\My\\New\\Directory')



Cheers,
Motoma

This post has been edited by Motoma: 06 July 2010 - 08:57 AM

Was This Post Helpful? 0
  • +
  • -

#5 draike09  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 19
  • Joined: 21-May 10

Re: Help how to create new folder in mobile using python

Posted 06 July 2010 - 06:36 PM

Sir.thank you..hmm.but how do i create new folder based on user input..the user input the folder name in a text box and create it.. I tried create it using this code.

name=appuifw.query(u"new folder",'text')
os.mkdir(name)

but it didnt work.and nothing happends.

Sir hope u can correct my code..thank you sir..
Was This Post Helpful? 0
  • +
  • -

#6 Motoma  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 452
  • View blog
  • Posts: 796
  • Joined: 08-June 10

Re: Help how to create new folder in mobile using python

Posted 07 July 2010 - 05:24 AM

View Postdraike09, on 06 July 2010 - 07:36 PM, said:

Sir.thank you..hmm.but how do i create new folder based on user input..the user input the folder name in a text box and create it.. I tried create it using this code.

name=appuifw.query(u"new folder",'text')
os.mkdir(name)

but it didnt work.and nothing happends.

Sir hope u can correct my code..thank you sir..


Nothing happened?
No error message?
Have you tried trapping and displaying exception information using try...except?
Was This Post Helpful? 0
  • +
  • -

#7 draike09  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 19
  • Joined: 21-May 10

Re: Help how to create new folder in mobile using python

Posted 07 July 2010 - 04:23 PM

yup nothing happen sir..no i haven't tried..coz i don't know how to use exeption..how can i do that sir?
can you re-correct the code I've tried.. i dont know how to trap exeption.
Was This Post Helpful? 0
  • +
  • -

#8 Motoma  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 452
  • View blog
  • Posts: 796
  • Joined: 08-June 10

Re: Help how to create new folder in mobile using python

Posted 08 July 2010 - 06:52 AM

The only advise for helping debug your device is to look at this link.

Sorry I couldn't be more helpful.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1