+ 2

When I run a code that creates a new text file in the Code Playground, where is the text file located?

Suppose that I run the following Python program in the Code Playground: f = open("newFile.txt", "w") f.write("Mystery file!") f.close() Where is newFile.txt located? Is it just a virtual file or is it physical? Where in the file system would it be located, in both the SoloLearn website and the Android app?

22nd Jul 2017, 1:53 AM
Erik Johanson
Erik Johanson - avatar
3 Respuestas
+ 9
It is being created at server-side (...\Playground\), and will be stored until your code exits (upon which the file will be wiped).
22nd Jul 2017, 2:38 AM
Hatsy Rei
Hatsy Rei - avatar
+ 4
in the same path of source code file
22nd Jul 2017, 2:04 AM
TheAtito
TheAtito - avatar
+ 1
I highly doubt it's being created at all. If it exists for a micro second it might briefly live in a temp directory. Also since the app is running virtually it isn't going to create a file in your file system.
22nd Jul 2017, 1:58 AM
Jim Tully
Jim Tully - avatar