I was trying a small example where I was trying to dump a data structure to a file , just like I would do in Perl with the help of Data::Dumper
. The following is the example I tried
import pickle
ff = open('/Users/arunpotharaju/hell','wb')
favorite_color = { "lion": "yellow", "kitty": "red" }
pickle.dump(favorite_color,ff,0)
The following is the output in the file hell
(dp0
S'lion'
p1
S'yellow'
p2
sS'kitty'
p3
S'red'
p4
s.
I was looking for more of a Data::Dumper
style output from Perl, which is very helpful in debugging. Can I make it any better?