+ 1

Text editor during Python tutorial

How do i access a text editor and then create the file, and then open file and add to it, then rename and open a files.py file and add the path and all that. I am very new to all of this and am stuck on the exercise of 6 methods or reading file task. I dont know how to operate the text editor so i can create a file add to that file and set a path.

27th Mar 2024, 8:30 PM
BG
BG - avatar
4 Antworten
+ 3
BG , what operating system are you currently running on your laptop?
29th Mar 2024, 4:39 PM
Lothar
Lothar - avatar
+ 2
BG , The text editor on Sololearn is the Code Playground, accessible via Create > Code > New (icon like a plus sign + in a circle). File access is somewhat limited here. Sololearn runs your program in a virtual environment that resets every run. You are limited to the folder structure in that environment. Some Sololearn example files are always there. You can have your program open one of them, or it can open a new file, write to it, and read from it while your program runs, but the file will be lost when your program ends. I think the folder structure has changed sometime in the last few months. I haven't tried it lately, but somebody else will probably describe it.
27th Mar 2024, 11:18 PM
Rain
Rain - avatar
+ 2
BG , from what you are describing, i would recommend you to use a local coding ide on your device. this enables you to work with files, paths, directories. if you are on android, you can try `pydroid`. the basic verion is free, but advertising is annoying. so it needs to buy the lifetime ad--free version. you can get more info by visiting the playstore. for ios systems, you may go for `pythonista`. i used this years ago, but i am not sure if it is still available with an up-to-date python version. to create txt files as input files for your program, you can use simple text editors, which can save the content in pure text format.
28th Mar 2024, 10:34 AM
Lothar
Lothar - avatar
+ 1
Thank you very much Lothar...that answers some questions. is it possible to change the OS on my laptop
29th Mar 2024, 4:09 PM
BG
BG - avatar