473,473 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Python 2.5 idle and print command How do I suppress a line feed?

Hi,
I am having a problem with print statements always cause a line feed.
I need to print a line of text, then the next print statement will
start printing where the last one stopped rather than drop down a line.

In basic we can do this with print "texst"; followed by next command
print "text2"
So how do I do that in python?

Nov 23 '06 #1
3 3364
notejam wrote:
Hi,
I am having a problem with print statements always cause a line feed.
I need to print a line of text, then the next print statement will
start printing where the last one stopped rather than drop down a line.

In basic we can do this with print "texst"; followed by next command
print "text2"
So how do I do that in python?
Thusly...

print "texst",
print "text2"

--
work: http://www.kelpiesoft.com
blog: http://www.willmcgugan.com
Nov 23 '06 #2
notejam wrote:
Hi,
I am having a problem with print statements always cause a line feed.
I need to print a line of text, then the next print statement will
start printing where the last one stopped rather than drop down a line.

In basic we can do this with print "texst"; followed by next command
print "text2"
So how do I do that in python?
Or if you want to get rid of the space...

import sys
sys.stdout.write("texst")
sys.stdout.write("text2")

--
--
work: http://www.kelpiesoft.com
blog: http://www.willmcgugan.com
Nov 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: M.E.Farmer | last post by:
Hello c.l.py!, I have just finished this and decided to share. PySourceColor is a module to convert Python source into colored html. Yes it has been done before, but I like this better:) You can...
3
by: Canes_Rock | last post by:
The information posted at: ...
5
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would...
6
by: Lex Hider | last post by:
Hi, Apologies if this is against etiquette. I've just got my first python app up and running. It is a podcast aggregator depending on feedparser. I've really only learnt enough to get this up and...
12
by: adamurbas | last post by:
ya so im pretty much a newb to this whole python thing... its pretty cool but i just started today and im already having trouble. i started to use a tutorial that i found somewhere and i followed...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.