output problem

J

Jean-Paul VALENTIN

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')


About Ingenico: Ingenico is the world's leading provider of payment solutions, with over 15 million terminals deployed across the globe. Delivering the very latest secure electronic payment technologies, transaction management and the widest range of value added services, Ingenico is shaping the future direction of the payment solutions market. Leveraging on its global presence and local expertise, Ingenico is reinforcing its leadership by taking banks and businesses beyond payment through offering comprehensive solutions, a true source of differentiation and new revenues streams.
This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.
P Please consider the environment before printing this e-mail
 
7

7stud

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$
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,229
Latest member
GloryAngul

Latest Threads

Top