How to upload a text file to sololearn | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to upload a text file to sololearn

How to upload a text file to sololearn and then access it from python code. Thank you in advance

10th Feb 2021, 2:04 PM
Raj Charan
9 Answers
+ 7
there's almost two ways: + upload your text file elsewhere and fetch it from python... + copy/paste text file content in your python script, write it to a temp file, access your newly created file in the same script...
10th Feb 2021, 2:10 PM
visph
visph - avatar
+ 3
visph I am talking about writing text files over web like if file is stored in drive and we want to write something to it.
10th Feb 2021, 3:14 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 1
visph what about writing a text into a file stored on other platform as SL dont provide support for permanent files.
10th Feb 2021, 3:07 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 1
AKSHAY [less active] that's a read-only workaround ;)
10th Feb 2021, 3:15 PM
visph
visph - avatar
+ 1
AKSHAY [less active] you could ever rely on server side to handle a CRUD service... with your own host ;)
10th Feb 2021, 3:17 PM
visph
visph - avatar
+ 1
Lol
12th Feb 2021, 4:34 AM
Meeckhaill
Meeckhaill - avatar
0
‎   ‎ ‎  there is already a code on this topic, which was created by one of a user and that code is a combination of two codes of David Ashton in python. That code works well but I haven't checked it after SoloLearn new web updates
10th Feb 2021, 3:05 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
0
AKSHAY [less active] use request module and fetch file by its public url...
10th Feb 2021, 3:09 PM
visph
visph - avatar
10th Feb 2021, 3:57 PM
Nor'wester 🌪️ 🇧🇩 (INACTIVE)
Nor'wester 🌪️ 🇧🇩 (INACTIVE) - avatar