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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • srinivasan srinivas

    #1

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

    Thanks,
    Srini


    Bollywood, fun, friendship, sports and more. You name it, we have it on http://in.promos.yahoo.com/groups/bestofyahoo/
  • oj

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

    On Jul 14, 11:41 am, srinivasan srinivas <sri_anna...@ya hoo.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:
    Source code: Lib/pprint.py The pprint module provides a capability to “pretty-print” arbitrary Python data structures in a form which can be used as input to the interpreter. If the formatted struc...


    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

    Comment

    Working...