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
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
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
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
I can't find a formatting way to get columns of data.
--
https://mail.python.org/mailman/listinfo/python-list
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
[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
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
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
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
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
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
>>
.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
>
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__
>>
>> Ho
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
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
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
Steve Holden wrote:
> Ilias Lazaridis wrote:
> > Ilias Lazaridis wrote:
> >
> >>IDLE has an output format like this:
> >>
> >> >>> object
> >>
> >> >>> type
> >>
> >> >>> object.__class__
Ilias Lazaridis wrote:
> Ilias Lazaridis wrote:
>
>>IDLE has an output format like this:
>>
>> >>> object
>>
>> >>> type
>>
>> >>> object.__class__
>>
>> >>> object.__bases__
>>
>>How
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 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
29 matches
Mail list logo