[IPython-user] Re: String render
Damien DEGOIS
ddegois at gmail.com
Mon Jul 25 11:36:11 CDT 2005
Thank you a lot ^^
2005/7/25, Robert Kern <rkern at ucsd.edu>:
> Damien DEGOIS wrote:
> > Hello,
> >
> > i'd like to know what's the function used to format tuples,dicts, etc
> > with indentation when output ex:
> >
> > In [16]: a = ['abc','def','ghi','jkl',{'a':1,'b':2,'c':3,'d':4,'e':5,'f':['aze','qsd']},{'aze':123,'eza':654}]
> > In [17]: a
> > Out[17]:
> > ['abc',
> > 'def',
> > 'ghi',
> > 'jkl',
> > {'a': 1, 'c': 3, 'b': 2, 'e': 5, 'd': 4, 'f': ['aze', 'qsd']},
> > {'aze': 123, 'eza': 654}]
> >
> >
> > And i would like to know how i can reuse it in my scripts (is it
> > ipython specific or not ?) ?
>
> Look at the pprint module.
>
> --
> Robert Kern
> rkern at ucsd.edu
>
> "In the fields of hell where the grass grows high
> Are the graves of dreams allowed to die."
> -- Richard Harter
>
> _______________________________________________
> IPython-user mailing list
> IPython-user at scipy.net
> http://scipy.net/mailman/listinfo/ipython-user
>
More information about the IPython-user
mailing list