output problem

7stud bbxx789_05ss at yahoo.com
Sun Jan 18 10:40:20 EST 2009


On Jan 16, 8:24 am, "Jean-Paul VALENTIN" <Jean-
Paul.VALEN... at ingenico.com> wrote:
> Feature? the output of below Hello program he0.py started from command
> line looks as follows:
> F:\prompt>he0.py
> Hello
> F:\prompt>
>
> 'Hello' was sent with sys.stdout.write, so "without newline".
> But why cannot be output (more logically):
> F:\prompt>he0.py
> HelloF:\prompt>
>
> Is it normal? Is there any means or workaround to obtain that output if
> I wish??
> ________________________________________________________________________
> ______________________
> #!/usr/bin/python
> #-*- coding: iso-8859-15 -*-
> import sys
> sys.stdout.write('Hello')
>

Not on a Mac:

import sys
sys.stdout.write("hello")

output:
$ python 6test.py
hello$




More information about the Python-list mailing list