Re: Output format

2016-03-20 Thread Rustom Mody
On Monday, March 21, 2016 at 5:54:31 AM UTC+5:30, Mark Lawrence wrote: > On 20/03/2016 23:37, : > > I can't find a formatting way to get columns of data. > > > > Take your pick from:- > > https://docs.python.org/3/library/stdtypes.html#string-methods > > https://docs.python.org/3/library/stdtype

Re: Output format

2016-03-20 Thread Alphwe
On Monday, March 21, 2016 at 7:37:39 AM UTC+8, vernl...@gmail.com wrote: > I can't find a formatting way to get columns of data. I don't think this express is a question, or asking for help. -- https://mail.python.org/mailman/listinfo/python-list

Re: Output format

2016-03-20 Thread Mark Lawrence
On 20/03/2016 23:37, vernleff...@gmail.com wrote: I can't find a formatting way to get columns of data. Take your pick from:- https://docs.python.org/3/library/stdtypes.html#string-methods https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting https://docs.python.org

Re: Output format

2016-03-20 Thread Joel Goldstick
On Sun, Mar 20, 2016 at 7:37 PM, wrote: > I can't find a formatting way to get columns of data. > -- > https://mail.python.org/mailman/listinfo/python-list > Welcome Vern. We're gonna need more than that -- os, python version, your code, traceback if you get one, what results you get, what you

Output format

2016-03-20 Thread vernleffler
I can't find a formatting way to get columns of data. -- https://mail.python.org/mailman/listinfo/python-list

fixing xml output format

2009-11-24 Thread wadi wadi
Hi all, I am creating some xml output using minidom and saving it to a file using doc.writexml() The output however is as follows: bill catman Is there a way to save xml output in a file such as xml is formatted the right way? I mean with the right indentation and the elements val

Re: Evolving doctests for changing output format

2007-01-10 Thread Raymond Hettinger
[EMAIL PROTECTED] > What I'd like is if I could get doctest to take my tests, and > substitute the obtained output for the provided output. There's currently no support for auto-updating doctests. I think it would make for a good feature request. In the meantime, it may not be difficult to roll

Evolving doctests for changing output format

2007-01-08 Thread nriley
Hi, I've got a number of doctests which rely on a certain output format, and since I wrote the tests I've changed the output format. Now, almost all the tests fail. What I'd like is if I could get doctest to take my tests, and substitute the obtained output for the provided o

Re: IDLE - Customizing output format

2006-10-07 Thread Ilias Lazaridis
Ilias Lazaridis wrote: > IDLE has an output format like this: > > >>> object > > >>> type > > >>> object.__class__ > > >>> object.__bases__ > > How can I customize it to become like that: > > >>> object

Re: IDLE - Customizing output format

2006-10-07 Thread Ilias Lazaridis
Gabriel Genellina wrote: > At Wednesday 27/9/2006 09:29, Ilias Lazaridis wrote: > > >import sys > >def f(obj): > > if obj: > > print '::: ' + repr(obj) > >sys.displayhook = f > > Have you tried that? You have to filter out None, not *any* False value. > > > > And notice that this replac

Re: IDLE - Customizing output format

2006-09-28 Thread Ilias Lazaridis
Gabriel Genellina wrote: > At Wednesday 27/9/2006 09:29, Ilias Lazaridis wrote: > > >import sys > >def f(obj): > > if obj: > > print '::: ' + repr(obj) > >sys.displayhook = f > > Have you tried that? You have to filter out None, not *any* False value. you are right. 1 == 0 showed an em

Re: IDLE - Customizing output format

2006-09-27 Thread Gabriel Genellina
At Wednesday 27/9/2006 09:29, Ilias Lazaridis wrote: import sys def f(obj): if obj: print '::: ' + repr(obj) sys.displayhook = f Have you tried that? You have to filter out None, not *any* False value. > And notice that this replaces the output of *evaluated* expressions, > not a

Re: IDLE - Customizing output format

2006-09-27 Thread Ilias Lazaridis
Gabriel Genellina wrote: > At Tuesday 26/9/2006 15:29, Ilias Lazaridis wrote: > > > > >>> def f(obj): > > > print '' + repr(obj) > > > > > > >>> sys.displayhook = f > > > >I've placed this code within /Lib/sitecustomize.py, but have one > >strange result: ... > > >>> t.sayHello() > >Hel

Re: IDLE - Customizing output format

2006-09-27 Thread Ilias Lazaridis
James Stroud wrote: > Ilias Lazaridis wrote: ... > Well, for example, the output (I'm indenting manually for visual clarity): > > >>> print 'bob' > : bob > >>> print [i for i in xrange(3)] > : [0, 1, 2] > > > Would create the following selection in "doctest" mode (again

Re: IDLE - Customizing output format

2006-09-26 Thread James Stroud
Ilias Lazaridis wrote: > James Stroud wrote: >>Ilias Lazaridis wrote: >>>I am wondering that other users are not annoyed by this reduced >>>readability. >> >>I'm sure its quite unpopular to agree with you, but I do. I am >>tremendously annoyed the format of the interactive interpreter. Lovely >>wou

Re: IDLE - Customizing output format

2006-09-26 Thread Gabriel Genellina
At Tuesday 26/9/2006 15:29, Ilias Lazaridis wrote: > >>> def f(obj): > print '' + repr(obj) > > >>> sys.displayhook = f I've placed this code within /Lib/sitecustomize.py, but have one strange result: >>> from talker import * >>> t = Talker() >>> t.sayHello : > >>> t.sayHello() H

Re: IDLE - Customizing output format

2006-09-26 Thread Gabriel Genellina
s.html > > > > >>> import sys > > >>> def f(obj): > > print '' + repr(obj) > > >>> sys.displayhook = f > > Sometimes I enable a similar approach on my sitecustomize.py, using > the pprint module. But I don't

Re: IDLE - Customizing output format

2006-09-26 Thread Ilias Lazaridis
James Stroud wrote: > Ilias Lazaridis wrote: ... > > I am wondering that other users are not annoyed by this reduced > > readability. > > I'm sure its quite unpopular to agree with you, but I do. I am > tremendously annoyed the format of the interactive interpreter. Lovely > would be output as you

Re: IDLE - Customizing output format

2006-09-26 Thread Robert Kern
Ilias Lazaridis wrote: > Robert Kern wrote: >> Anyways, against my better judgement, I will tell you that you can customize >> the >> output by replacing sys.displayhook with your own function: >> >>http://www.python.org/doc/current/lib/module-sys.html >> >> >>> import sys >> >>> 1 >> 1 >>

Re: IDLE - Customizing output format

2006-09-26 Thread Ilias Lazaridis
.org/doc/current/lib/module-sys.html > > > > >>> import sys > > >>> def f(obj): > > print '' + repr(obj) > > >>> sys.displayhook = f > > Sometimes I enable a similar approach on my sitecustomize.py, using >

Re: IDLE - Customizing output format

2006-09-26 Thread Ilias Lazaridis
Robert Kern wrote: > Ilias Lazaridis wrote: > > Steve Holden wrote: > > >> And I am wondering at your continual surprise when the rest of the world > >> fails to share your perceptions. Doesn't this carry *any* information? > > > > not the rest of the world, but the rest of the python community. >

Re: IDLE - Customizing output format

2006-09-26 Thread James Stroud
Ilias Lazaridis wrote: > Ilias Lazaridis wrote: >> IDLE has an output format like this: >> >> >>> object >> >> >>> type >> >> >>> object.__class__ >> >> >>> object.__bases__ >> >> Ho

Re: IDLE - Customizing output format

2006-09-25 Thread Gabriel Genellina
bj): print '' + repr(obj) >>> sys.displayhook = f Sometimes I enable a similar approach on my sitecustomize.py, using the pprint module. But I don't *always* like the outpu

Re: IDLE - Customizing output format

2006-09-24 Thread Robert Kern
Ilias Lazaridis wrote: > Steve Holden wrote: >> And I am wondering at your continual surprise when the rest of the world >> fails to share your perceptions. Doesn't this carry *any* information? > > not the rest of the world, but the rest of the python community. Remember back when you first cam

Re: IDLE - Customizing output format

2006-09-24 Thread Diez B. Roggisch
o it looks that I have to code to change the output format. > > Reminds me 'good old days'. Gosh. Shocking. A programmer is supposed to program if he wants a program to behave differently. When the heck has this world mutated from a place where uttering nonsense made it immediat

Re: IDLE - Customizing output format

2006-09-24 Thread Ilias Lazaridis
Steve Holden wrote: > Ilias Lazaridis wrote: > > Ilias Lazaridis wrote: > > > >>IDLE has an output format like this: > >> > >> >>> object > >> > >> >>> type > >> > >> >>> object.__class__

Re: IDLE - Customizing output format

2006-09-24 Thread Steve Holden
Ilias Lazaridis wrote: > Ilias Lazaridis wrote: > >>IDLE has an output format like this: >> >> >>> object >> >> >>> type >> >> >>> object.__class__ >> >> >>> object.__bases__ >> >>How

Re: IDLE - Customizing output format

2006-09-24 Thread Ilias Lazaridis
Ilias Lazaridis wrote: > IDLE has an output format like this: > > >>> object > > >>> type > > >>> object.__class__ > > >>> object.__bases__ > > How can I customize it to become like that: > > >>> object

IDLE - Customizing output format

2006-09-23 Thread Ilias Lazaridis
IDLE has an output format like this: >>> object >>> type >>> object.__class__ >>> object.__bases__ How can I customize it to become like that: >>> object >>> type >>> object.__class__ >>> o