#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Posts
    2
    Rep Power
    0

    Python - Is there no way to clear the idle screen?


    I've been looking around for hours and it seems there is no way to clear the screen when running your program in the idle window.

    The reason I'm looking is we do minor programming assignments in Python that we only run in the idle window. Its easy enough to clear the screen in a dos window but I have not found a definatvie "Its not possible" to do it the idle window.

    The only thing I see possible at the moment is to write off blank lines till clear but that seems a little wasteful.

    I've seen a couple references to backspacing but it doesn't seem to work in idle.

    Any help would be appriciated, if anything just a "no its not possible" so I can give up looking! This is driving me crazy
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    25
    Rep Power
    0

    Thumbs down


    IDLE has no such "clear screen" feature. The best I can recommend is printing blank lines like you suggested.
  4. #3
  5. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    I'm with mamba - there is no way to do this in IDLE - blank lines are very useful though. On the other hand you can always restart IDLE now and again to prevent things from getting too bloated.

    Mark.
    programming language development: www.netytan.com Hula

  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    44
    Rep Power
    11
    Undo also could do the job, though not so much intelligent
  8. #5
  9. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Also i dont think Undo works the same in the version of IDLE packaged with Python 2.3 which is a bit of a bummer - but then i guess undo only removed the line from IDLE rather than undoing the effect on the session in earlier versions. Ah well

    Mark.
    programming language development: www.netytan.com Hula

  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Posts
    2
    Rep Power
    0
    Thanks for the responces guys. I'm not familiar with undo but I'll take a look at the documentation for it.

    At least I can rest easy knowing its not possible!

    Thanks again
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    44
    Rep Power
    11
    Damn.. I'm still on Python 2.2

    Originally Posted by netytan
    ...but then i guess undo only removed the line from IDLE rather than undoing the effect on the session in earlier versions. Ah well

    Mark.
    Yes, in certain codition, there will be some trouble.
  14. #8
  15. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,643
    Rep Power
    4248
    Looks like the clrscr() function we discussed here is getting popular after all
    http://forums.devshed.com/t143030/s.html
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    Originally Posted by jarchn
    I've been looking around for hours and it seems there is no way to clear the screen when running your program in the idle window.
    You have the source code to Idle, so it should be possible to modify it to do what you want. Perhaps you could set it as an exercise for the class.

    Dave - The Developers' Coach

IMN logo majestic logo threadwatch logo seochat tools logo