[newbie]Is there a module for print object in a readable format?
Steven D'Aprano
steve at REMOVETHIScyber.com.au
Wed Oct 19 10:02:17 EDT 2005
On Wed, 19 Oct 2005 09:39:48 +0800, James Gan wrote:
> Hi, Steven
>
> :) width parameter do the magic :
>
> >>> pprint.pprint([1,2,3,4,[0,1,2,[3,4]],5], width=1,indent=4)
> [ 1,
> 2,
> 3,
> 4,
> [ 0,
> 1,
> 2,
> [ 3,
> 4]],
> 5]
> >>>
That's not what I get. What are you using?
py> pprint.pprint([1,2,3,4,[0,1,2], 5], width=1, indent=4)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: pprint() got an unexpected keyword argument 'width'
--
Steven.
More information about the Python-list
mailing list