Python Forum
Restrictions in online coding - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: Restrictions in online coding (/thread-2074.html)



Restrictions in online coding - Lux - Feb-17-2017

Hi!
I am doing coding for a class project, but I am not in a coding class. This means I can take any coding help. However, I am using school computers where downloading things is not allowed. I code python on IDLE at home, but I am using repl.it at school.

The problem I am running into is that I need to save data across runs- just a few lists. With IDLE, I could just use a .txt file, but I cannot do this with repl.it. 

Is there any other way to do this? If so, what is the easiest way? (I'm still relatively new to Python)

Thanks!

-Lux


RE: Restrictions in online coding - Larz60+ - Feb-17-2017

I can't find any information on downloading code from repl.it.
The only suggestion I would have is to cut and paste the code.
If you are able to use a dongle on your school machine, you can
use ctrl-c (to copy) and ctrl-v (to paste)

Can you login to repl.it at home?


RE: Restrictions in online coding - Lux - Feb-17-2017

I'm sorry, I don't think I made my problem clear. I am taking user inputted lists. I want to be able to save this data so I can use it the next time I run the program. Normally, I would do this with a text file, but that is not a option.
I would like to know if there is a different way to do this, or if using a different online compiler might help.
Sorry about the confusion.


RE: Restrictions in online coding - nilamo - Feb-17-2017

A usb drive, with your text files on it?


RE: Restrictions in online coding - merlem - Feb-17-2017

Could you use the python module 'shelve'? Or is this prevented by the same constraints as using a txt file?


RE: Restrictions in online coding - Larz60+ - Feb-17-2017

I think I know what you are trying to do now.
You're trying to save python lists to a file, correct
for this you can use json files. see: https://docs.python.org/3.4/library/json.html


RE: Restrictions in online coding - Ofnuts - Feb-17-2017

You need some kind of "pastebin" site. See pastebin.com or others.


RE: Restrictions in online coding - Lux - Feb-17-2017

(Feb-17-2017, 07:51 PM)merlem Wrote: Could you use the python module 'shelve'? Or is this prevented by the same constraints as using a txt file?

Thanks for the advice! I tried shelve and it worked very well.