0

I have a file with the following content

(dp1 
S'SomethingString1' 
p2
(dp3
S'SomethingString2' 
p4
I3
sS'SomethingString3' 
p5
I7105
sS'SomethingString4'
p6
I0

How do I get data from it using python "struct.unpack"

1 Answer 1

1

You have a pickle file, use the pickle module instead.

The struct module won't help here; that module is used for binary data packed following C struct conventions, and the pickle format you are looking at is textual.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.