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 > > >>> type > > >>> object.__class__ > > >>> object.__bases__ > >

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
At Tuesday 26/9/2006 15:31, Ilias Lazaridis 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 > > >

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
Gabriel Genellina wrote: > At Sunday 24/9/2006 18:55, 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 > > > >

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__ >> >> How can I customize it to become like that: >> >> >>> object >> >> >>> type >> >> >>> object.__cl

Re: IDLE - Customizing output format

2006-09-25 Thread Gabriel Genellina
At Sunday 24/9/2006 18:55, 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 >>> def f(obj): print '

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
>> 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. > > That's a big difference. > > So it looks that I have to code to change th

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__ > >> > >> >>> object.__bases__ > >> > >>How can I customize it to become like that: > >> > >> >>> object > >>

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 can I customize it to become like that: >> >> >>> object >> >> >>> type >> >> >>> object.__class__ >>

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 > > >>> type > > >>> object.__class__ > > >>> object.__bases__ > >

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__ >>> object.__bases__ or that: >>> object : >>> type : >>> object.__cla