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__
>
>
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
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
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
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
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
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
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
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
> > >
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
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
>>
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
> >
> >
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.
>
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
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 '
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
>> 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
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
> >>
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__
>>
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 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
21 matches
Mail list logo