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]
>>>
Steven D'Aprano wrote:
> On Mon, 17 Oct 2005 11:31:46 +0200, enrico.sirola_NOSPAM wrote:
>
>
>>>>>>>"James" == James Gan <[EMAIL PROTECTED]> 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
>>pprint(object)
>
>
> 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]
>
>
--
http://mail.python.org/mailman/listinfo/python-list