Do we have perl's Data::Dumper equivalent in Python??

oj ojeeves at gmail.com
Mon Jul 14 11:37:54 EDT 2008


On Jul 14, 11:41 am, srinivasan srinivas <sri_anna... at yahoo.co.in>
wrote:
> Thanks,
> Srini
>
>       Bollywood, fun, friendship, sports and more. You name it, we have it onhttp://in.promos.yahoo.com/groups/bestofyahoo/

You might have more luck asking for help if you explained what Perl's
Data::Dumper actually does, instead of expecting people to either just
know, or to go and look it up.

In particular, what functionality of Data::Dumper is it you are
looking for?

For a user friendly representation of a python data structure, look at
pprint:
http://docs.python.org/lib/module-pprint.html

For a string representing a data structure that can be eval'd to get
the structure back again, look at the built-in repr()

-Oli



More information about the Python-list mailing list