Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > extension to idle to clear screen - but how to write to screen?

Reply
Thread Tools

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

 
 
owl
Guest
Posts: n/a
 
      11-15-2007
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?
 
Reply With Quote
 
 
 
 
Tal Einat
Guest
Posts: n/a
 
      11-17-2007
On Nov 15, 10:20 pm, owl <(E-Mail Removed)> wrote:
> 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-']]*1[3]

P.S. Feel free to contact the idle-dev mailing list: idle-dev <at>
python (dot) org
 
Reply With Quote
 
 
 
 
owl
Guest
Posts: n/a
 
      11-22-2007
On Nov 17, 3:27 pm, Tal Einat <(E-Mail Removed)> wrote:
> On Nov 15, 10:20 pm, owl <(E-Mail Removed)> wrote:
>
>
>
> > 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-']]*1[3]
>
> P.S. Feel free to contact the idle-dev mailing list: idle-dev <at>
> python (dot) org


Thanks!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
laptop only 1/4 screen but on full screen bugsy General Computer Support 0 04-01-2008 08:51 AM
Response.Clear() doesn't clear David ASP .Net 2 01-31-2008 08:32 PM
Unrecognized element 'add' after <clear></clear> InvalidLastName ASP .Net Web Services 3 03-06-2007 03:07 AM
Python Program runs but itself but does not run under IDLE Ollie Python 0 10-02-2003 04:05 PM



Advertisments