Select to view content in your preferred language

Clear ArcPy IDLE screen

1599
4
03-23-2013 03:36 AM
ErnestDunwoody
Emerging Contributor
Does anyone know:

How do you clear the IDLE ArcPy screen.
Won't work with a screen full of mistakes.

Tried general advice from the web about using:

import os
os.system('cls') #on windows

Doesn't work on IDLE screen.
cls on DOS was so basic.

Thank you,
Edi
Tags (2)
0 Kudos
4 Replies
markdenil
Frequent Contributor
Yes, cls was very basic.
As I recall, in DOS (not the sorta-DOS you get in the command window today)
cls just interupted the screen power, wiping the existing characters....

I "clear" the IDLE screen the same way I used to clear an Xwindow: hold down the enter key until the offending text scrolls off the top.
If you do that, IDLE will even skip the >>> prompt on some lines in its haste to respond.....
0 Kudos
KimOllivier
Honored Contributor
I have the same problem in the PythonWin screen (derived from IDLE with a windows front-end).
I right-click to selectAll and then Cut.

But it doesn't work in IDLE.
Another reason to keep using Pythonwin.
0 Kudos
curtvprice
MVP Alum
I look as IDLE as the vi of Python IDE's - always there, trustworthy, fast, but not fancy at all.

(I'm a big Wing fan myself -- although I don't use 99% of its capabilities, I have found it more than worth the money.)
0 Kudos
curtvprice
MVP Alum

I "clear" the IDLE screen the same way I used to clear an Xwindow: hold down the enter key until the offending text scrolls off the top.
If you do that, IDLE will even skip the >>> prompt on some lines in its haste to respond.....


>>> def cls(): print "\n"*30
>>>
>>> cls()
0 Kudos