After hours of exercises I want to clear the screen to remove the debris above. I am using IDLE as the shell. Any hope?
Research Research Research.
I can find none that work on the iMac.
After hours of exercises I want to clear the screen to remove the debris above. I am using IDLE as the shell. Any hope?
Research Research Research.
I can find none that work on the iMac.
Are you on linux? It's the only os that can clear IDLE, as far as I'm aware:
import os
os.system('clear')
Of course, there's always the goofy option:
print("\n") * 100
AFAIK, there is no built in functionality for this in idle. You can sort of “clear” it by printing a bunch of new lines though.
print(‘\n’*80)
The following works now on any system, not just Mac: open an editor window if there is not one already (new, untitled, is OK), close Shell, in the editor, click Run => Python Shell or Run Module (F5).
Adding something more direct has been discussed for a decade, but with no agreement on the various technical issues. I am thinking now of adding a "Clear and Restart" item to the Shell menu that would irreversibly clear Shell's window, keep the statement history, and restart the execution process (which is what 'Restart Shell' does).