Python Forum
Restrictions in online coding
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Restrictions in online coding
#1
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
Reply
#2
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?
Reply
#3
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.
Reply
#4
A usb drive, with your text files on it?
Reply
#5
Could you use the python module 'shelve'? Or is this prevented by the same constraints as using a txt file?
Reply
#6
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
Reply
#7
You need some kind of "pastebin" site. See pastebin.com or others.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply
#8
(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.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020