QPython - Reading a file

Wanderer picture Wanderer · Feb 19, 2015 · Viewed 8.4k times · Source

I have installed QPython in my Android mobile. I written a statement in the QEdit to read a text file from the below path

/storage/emulated/0/com.hipipal.qpyplus/script3/File1.txt

I used the below statement

fob=open('/storage/emulated/0/com.hipipal.qpyplus/script3/File1.txt','r')
fob.read()

If I run the statement, it is throwing error as:

IOError:[Errno 2] No such file or directory: '/storage/emulated/0/com.hipipal.qpyplus/script3/File1.txt'
1|uo_a116@cancro:/ $

Is the above statement correct?

Answer

jpl picture jpl · Mar 9, 2015
fob=open('File1.txt','r')

Is not working in version 1.0.4.

fout=open('File2.txt','w')

Was working on version 0.9.6, but is not working in 1.0.4. The "error" is Read only file system.

It looks like restrictions in the (new 1.0.4) file system library. I post a mail to the editor, but no answer at this time.