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
On Oct 20, Steven D'Aprano wrote:
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'
I find it useful to have all
Micah Elliott wrote:
On Oct 20, Steven D'Aprano wrote:
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'
I find
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,
Yes, that's what I need! Thank you all
bruno modulix wrote:
James Gan wrote:
I want the object printed in a readable format. For example,
x =[a, b, c, [d e]] will be printed as:
x--a
|_b
|_c
|___d
|_e
I tried pickled, marshel. They do different work.
Is there another
module which do
I want the object printed in a readable format. For example,
x =[a, b, c, [d e]] will be printed as:
x--a
|_b
|_c
|___d
|_e
I tried pickled, marshel. They do different work. Is there another
module which do this kind of job?
Thanks!
James Gan
--
James Gan wrote:
I want the object printed in a readable format. For example,
x =[a, b, c, [d e]] will be printed as:
x--a
|_b
|_c
|___d
|_e
I tried pickled, marshel. They do different work.
Is there another
module which do this kind of job?
pprint
--
bruno desthuilliers
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)
bye,
e.
--
On Mon, 17 Oct 2005 17:25:35 +0800, James Gan wrote:
I want the object printed in a readable format. For example,
x =[a, b, c, [d e]] will be printed as:
x--a
|_b
|_c
|___d
|_e
I think you missed an un- in your first sentence.
:-)
In general, if you want special/fancy/bizarre
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
What if a is a tuple of lists? What if b is a
class? What if c is a file object? I can't even
tell what [d e] means? IMHO the output isn't in
a readable format at all (perhaps something got
lost in the posting).
pprint is as close are you are going to find for a
general solution to this
11 matches
Mail list logo