May I ask a dumb question? I am working with Python 2.3 IDLE. I want
to completely clear the screen except for the ">>>", of course. What
do I use? I have tried a number of suggestions, but they don't do the
job. 2 2442
print '\n'*1000
"Art McClure" <aa****@yahoo.c om> wrote in message
news:7a******** *************** **@posting.goog le.com... May I ask a dumb question? I am working with Python 2.3 IDLE. I want to completely clear the screen except for the ">>>", of course. What do I use? I have tried a number of suggestions, but they don't do the job.
This change makes printing the formfeed character, '\f', clear the shell
window in idle. I don't know if it also has other undesirable
consequences (I'm not an idle user, and I don't have the patience to do
much testing). Given this,
def cls():
print '\f'
Index: Lib/idlelib//OutputWindow.py
=============== =============== =============== =============== =======
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/OutputWindow.py ,v
retrieving revision 1.10
diff -u -r1.10 OutputWindow.py
--- Lib/idlelib//OutputWindow.py 9 Jul 2003 18:48:24 -0000 1.10
+++ Lib/idlelib//OutputWindow.py 29 Feb 2004 01:30:34 -0000
@@ -35,6 +35,13 @@
# Act as output file
def write(self, s, tags=(), mark="insert"):
+ if "\x0c" in s:
+ print "OutputWindow.w rite saw ^L"
+ self.text.mark_ unset("iomark")
+ s = s.split("\x0c")[-1]
+ print "new s: ", s
+ self.text.delet e(0.0, "end")
+ self.text.mark_ set("iomark", 0.0)
# Tk assumes that byte strings are Latin-1;
# we assume that they are in the locale's encoding
if isinstance(s, str): This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: William C. White |
last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using
cURL? Our website is hosted on a shared drive and the webhost company
doesn't installed additional software (such as cURL) on the server because
of that. Our site will have an SSL certificate next week, so I would like
to use AIM instead of SIM, however, I don't know how to send data via POST
over https and recieve data from the Authorize.net server over an https...
|
by: Albert Ahtenberg |
last post by:
Hello,
I don't know if it is only me but I was sure that header("Location:url")
redirects the browser instantly to URL, or at least stops the execution of
the code. But appearantely it continues to execute the code until the
browser send his reply to the header instruction. So an exit(); after each
redirection won't hurt at all
|
by: James |
last post by:
Hi,
I have a form with 2 fields.
'A'
'B'
The user completes one of the fields and the form is submitted.
On the results page I want to run a query, but this will change
subject to which field is completed.
|
by: Ollivier Robert |
last post by:
Hello,
I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9
system. The link succeeds but everytime I try to run php, I get a SEGV from
inside the libcnltsh.so library.
354 roberto@ausone:Build/php-4.3.2> ldd /opt/php4/bin/php
libsablot.so.0 => /usr/local/lib/libsablot.so.0
libstdc++.so.5 => /usr/local/lib/libstdc++.so.5
libm.so.1 => /usr/lib/libm.so.1
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |