Saving list file via repl

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Barneybear
Posts: 8
Joined: Tue Dec 21, 2021 1:30 pm

Saving list file via repl

Post by Barneybear » Tue Jan 04, 2022 5:20 pm

Hi, I can load a list from a text file then with repl modify e.g names(0)=0 the list. When I try to save the modified list to the same text file i encounter an error stating names does not exist. After which if I try to print names it has disappeared from ram.. Is this a stream issue, Is their a work around please
Thank you

User avatar
skyark
Posts: 3
Joined: Fri Nov 26, 2021 8:14 pm
Contact:

Re: Saving list file via repl

Post by skyark » Wed Jan 05, 2022 12:35 am

Can you post the commands you use?

Barneybear
Posts: 8
Joined: Tue Dec 21, 2021 1:30 pm

Re: Saving list file via repl

Post by Barneybear » Wed Jan 05, 2022 2:37 pm

Thanks for the reply, using Json seems to overcome the problem, and the list does not disappear during write. All the best

Post Reply