[newbie]Is there a module for print object in a readable format?
steve at REMOVETHIScyber.com.au
Mon Oct 17 15:16:42 CEST 2005
On Mon, 17 Oct 2005 11:31:46 +0200, enrico.sirola_NOSPAM wrote:
>>>>>> "James" == James Gan <ganzhi at gmail.com> writes:
> James> I want the object printed in a readable format. For
> James> I tried pickled, marshel. They do different work. Is there
> James> another module which do this kind of job?
> from pprint import pprint
I don't think that even comes *close* to what James wants.
py> import pprint
py> pprint.pprint([1,2,3,4,[0,1,2], 5])
[1, 2, 3, 4, [0, 1, 2], 5]
More information about the Python-list