Python Forum
Thread Rating:
  • 3 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Data saving help
#4
You could use pickle to save the class, but I find it better to write specific save and load methods. With classes you can use getattr and setattr to put the saving and loading into loops. If you don't want go full on OOP yet, dictionaries are a good stepping stone. They can also be saved/loaded with a loop pretty easily.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Data saving help - by zedwardson - Oct-03-2017, 06:20 PM
RE: Data saving help - by ichabod801 - Oct-03-2017, 06:53 PM
RE: Data saving help - by zedwardson - Oct-03-2017, 06:59 PM
RE: Data saving help - by ichabod801 - Oct-03-2017, 07:06 PM
RE: Data saving help - by buran - Oct-03-2017, 07:09 PM
RE: Data saving help - by zedwardson - Oct-03-2017, 07:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help formatting dataframe data before saving to CSV cubangt 16 6,791 Jul-01-2022, 12:54 PM
Last Post: cubangt
  saving data from text file to CSV file in python having delimiter as space K11 1 2,548 Sep-11-2020, 06:28 AM
Last Post: bowlofred
  Reading serial data and saving to a file Mohan 1 7,791 May-25-2020, 04:18 PM
Last Post: pyzyx3qwerty
  Saving and accessing data from different clients SheeppOSU 1 2,057 Jul-28-2019, 02:15 AM
Last Post: metulburr
  Value Error and Saving Data to .csv caroline_d_124 1 2,420 Jan-06-2019, 10:53 PM
Last Post: stullis
  Need help saving data into MySQL database reezalaq 0 2,474 Jun-03-2018, 07:50 PM
Last Post: reezalaq
  Saving data in the Debugger macellan85 1 2,980 Apr-27-2017, 09:51 PM
Last Post: Larz60+
  Extracting data from tweets and saving it as CSV kiton 7 7,202 Feb-24-2017, 11:13 PM
Last Post: kiton

Forum Jump:

User Panel Messages

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