+ 3

How to open files in Android?(Python)

I want to open a ".txt" file usin SoloLearn's playground. It keeps giving me a file not found error. My code was, open("/storage/emulated/0/Downloads/mytextfile.txt")

26th Jul 2019, 4:03 PM
The Aemogie
The Aemogie - avatar
2 Respuestas
+ 1
I don't think you can access your filesystem through sololearn. You can use some other IDE like Pydroid https://play.google.com/store/apps/details?id=ru.iiec.pydroid3
26th Jul 2019, 4:26 PM
Aegon
Aegon - avatar
0
You need to put "//" double slash instead of single / slash. Like open("storage//emulated//0//Downloads//mytextfile.txt")
13th Oct 2020, 11:18 AM
Krishna Shukla
Krishna Shukla - avatar