473,395 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

extension to idle to clear screen - but how to write to screen?

owl
and here I thought I was going to finally be able to change the world
AND contribute back to python with my amazing clear screen extension -
but I can't get it to work. ;(

Copying from ZoomHeight.py and someone else's clever print suggestion:
-------------------------------------------------
# My Clear extension: clear a window

class Clear:

menudefs = [
('windows', [
('_Clear', '<<clear>>'),
])
]

def __init__(self, editwin):
self.editwin = editwin

def clear_event(self, event):
for i in range(60):
print
--------------------------------------------------

It shows up as a menu item, but does not do anything. No output,
nuffin.
I did get some sort of 'no connection msg' playing around which leads
me to believe that I can't really write to the window (at least not
this simplistically)...

Pointers?
Nov 15 '07 #1
2 3774
On Nov 15, 10:20 pm, owl <john_now...@carleton.cawrote:
and here I thought I was going to finally be able to change the world
AND contribute back to python with my amazing clear screen extension -
but I can't get it to work. ;(

Copying from ZoomHeight.py and someone else's clever print suggestion:
-------------------------------------------------
# My Clear extension: clear a window

class Clear:

menudefs = [
('windows', [
('_Clear', '<<clear>>'),
])
]

def __init__(self, editwin):
self.editwin = editwin

def clear_event(self, event):
for i in range(60):
print
--------------------------------------------------

It shows up as a menu item, but does not do anything. No output,
nuffin.
I did get some sort of 'no connection msg' playing around which leads
me to believe that I can't really write to the window (at least not
this simplistically)...

Pointers?
Try this:
self.editiwin.write('\n'*60)
- Tal Einat
reduce(lambda m,x:[m[i]+s[-1] for i,s in enumerate(sorted(m))],
[[chr(154-ord(c)) for c in '.&-&,l.Z95193+179-']]*18)[3]

P.S. Feel free to contact the idle-dev mailing list: idle-dev <at>
python (dot) org
Nov 17 '07 #2
owl
On Nov 17, 3:27 pm, Tal Einat <tal.no.no.s...@gmail.comwrote:
On Nov 15, 10:20 pm, owl <john_now...@carleton.cawrote:
and here I thought I was going to finally be able to change the world
AND contribute back to python with my amazing clear screen extension -
but I can't get it to work. ;(
Copying from ZoomHeight.py and someone else's clever print suggestion:
-------------------------------------------------
# My Clear extension: clear a window
class Clear:
menudefs = [
('windows', [
('_Clear', '<<clear>>'),
])
]
def __init__(self, editwin):
self.editwin = editwin
def clear_event(self, event):
for i in range(60):
print
--------------------------------------------------
It shows up as a menu item, but does not do anything. No output,
nuffin.
I did get some sort of 'no connection msg' playing around which leads
me to believe that I can't really write to the window (at least not
this simplistically)...
Pointers?

Try this:
self.editiwin.write('\n'*60)

- Tal Einat
reduce(lambda m,x:[m[i]+s[-1] for i,s in enumerate(sorted(m))],
[[chr(154-ord(c)) for c in '.&-&,l.Z95193+179-']]*18)[3]

P.S. Feel free to contact the idle-dev mailing list: idle-dev <at>
python (dot) org
Thanks!
Nov 22 '07 #3

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

Similar topics

15
by: Aubrey Hutchison | last post by:
### this will test if your version of IDLE on windows is a MATURE program design ### print "Hello world, If Python IDLE is a mature program design it will output this" Save this simple...
3
by: Miki Tebeka | last post by:
Hello All, I'd like to bind <CTRL+L> so that it will clear IDLE's screen (in the interactive prompt). Any pointers/suggetions? Thanks. Miki
1
by: Tim Rice | last post by:
I have a need to write data to the Windows clipboard from a Python script. I found a nice, simple solution @ http://wiki.wxpython.org/index.cgi/ClipBoard. The problem is, I can only get it to...
17
by: los | last post by:
Hi, I'm trying to create a program similar to that of Google's desktop that will crawl through the hard drive and index files. I have written the program and as of now I just put the thread to...
5
by: Kevin Buchan | last post by:
How can I tell if the system is 'idle', or the screen saver is running, or the machine is locked? I am writing an application that could really benefit from knowing this information. During...
3
by: writser | last post by:
hey all, For my study I'm writing a simple threaded webcrawler and I am trying to do this in python. But somehow, using threads causes IDLE to crash on Windows XP (with the latest python...
6
by: Andreas Tawn | last post by:
I'm trying to integrate the timeout function from here http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/473878 into a long running automation script and the following code causes IDLE after...
2
by: Claire | last post by:
Hi I would like to un-log users and return them back to the main screen of my application automatically if user activity (key presses/mouse) goes idle after a certain length of time. My main...
0
by: ajeetg | last post by:
I am developing a menu extension for Dialer screen for WM6 ( the screen that comes after we press call button on a contact ) Has any one tried that before ? I am aware of Menu extension for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
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,...
0
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.