Data::Dumper for Python

A.M. Kuchling amk at amk.ca
Fri Oct 29 08:20:53 EDT 2004


On Fri, 29 Oct 2004 00:34:31 -0700, 
	Josiah Carlson <jcarlson at uci.edu> wrote:
> Python's pprint is a fairly simple little module.  A reasonably
> experienced Python programmer could probably toss off a clone of it in a
> weekend if given a description of it.

Such as, for example, dulcinea.dumper (part of Dulcinea,
http://www.mems-exchange.org/software/dulcinea/):

>>> from dulcinea import dumper as d
>>> from ASTi.model import Model  
>>> m=Model()                    # Create an object
>>> d.dump(m)
<Model at 402e180c: <Model object at '/home/amk/.mbv/loader-test'>>
  _hc: <HydraController at 402ee86c>
  _instances: <dictionary at 0x4071fa44>: {}
  _links: None
  _mapping_file_applied: <bool at 0x8130da0>: False
  _model: <Model at 402e180c: <Model object at '/home/amk/.mbv/loader-test'>>
    object already seen
  _obj: <dictionary at 0x4071f68c>: {}
  install_error: None
  path: '/home/amk/.mbv/loader-test'
  root_dir: '/home/amk/.mbv/loader-test'
  services: <dictionary at 0x4071f79c>: {}
>>>

--amk



More information about the Python-list mailing list