Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pickle problem
#1
Hi,
I can write and read pickle files, no problem.
But if I lookup how to merge a pickle file to an existing pickle file, I get somewhat confused,
I find:
pickle.dump((pickle_new), open(old_pickle, 'ab'))  # does not seem to work
I have control over the alternatives:
a) I have a text file or list that i can append to the old_pickle, line by line.
b) I have said text also as a pickle file that i could append to the old_pickle.
What is the best way?
Obviously old and new files follow the same format.
thx,
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Reply


Messages In This Thread
pickle problem - by DPaul - Sep-26-2022, 09:22 AM
RE: pickle problem - by buran - Sep-26-2022, 10:24 AM
RE: pickle problem - by DPaul - Sep-26-2022, 02:44 PM
RE: pickle problem - by buran - Sep-26-2022, 03:15 PM
RE: pickle problem - by DPaul - Sep-26-2022, 05:17 PM
RE: pickle problem - by deanhystad - Sep-26-2022, 09:47 PM
RE: pickle problem - by DPaul - Sep-27-2022, 06:10 AM
RE: pickle problem - by Gribouillis - Sep-27-2022, 07:41 AM
RE: pickle problem - by DPaul - Sep-27-2022, 08:49 AM
RE: pickle problem - by Gribouillis - Sep-27-2022, 09:35 AM
RE: pickle problem - by DPaul - Sep-27-2022, 02:38 PM
RE: pickle problem - by Gribouillis - Sep-27-2022, 03:43 PM
RE: pickle problem - by deanhystad - Sep-27-2022, 04:18 PM
RE: pickle problem - by DPaul - Sep-27-2022, 05:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeError: cannot pickle ‘_asyncio.Future’ object Abdul_Rafey 1 595 Mar-07-2024, 03:40 PM
Last Post: deanhystad
  TypeError: cannot pickle n00sferatu 1 2,737 Dec-14-2021, 03:52 PM
Last Post: yakkaligiri
  Multiprocessing Can't pickle local object law 1 16,437 Aug-30-2021, 02:49 PM
Last Post: law
  Save/Loading using pickle Scordomaniac 4 3,149 Nov-24-2020, 06:11 PM
Last Post: Scordomaniac
  computing entropy using pickle files baran01 2 2,509 Dec-30-2019, 09:45 PM
Last Post: micseydel
  Tkinter don't get ver from file via pickle storzo 2 2,639 Jul-31-2019, 03:50 PM
Last Post: storzo
  pickle docs say bytes in one place, strings in another Skaperen 2 2,221 Jul-29-2019, 05:13 PM
Last Post: Skaperen
  pickle error SheeppOSU 4 11,127 Apr-20-2019, 04:50 PM
Last Post: SheeppOSU
  Using pickle.dump Friend 1 3,024 Feb-15-2019, 04:39 PM
Last Post: metulburr
  I'm having trouble with an OOP version of Pickle functionality CodeWolf 2 2,452 Dec-19-2018, 05:41 PM
Last Post: CodeWolf

Forum Jump:

User Panel Messages

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