[issue40708] Clearing the screen of IDLE interactive mode in Windows

2020-05-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: See #23220 for backspace and return behavior. -- versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker

[issue40711] Clearing the screen of IDLE interactive mode in Windows

2020-05-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: 3.5 and 3.6 only get security fixes. #6143 proposes to add special mechanism to clear Shell. It is a low priority for me as I very seldom want to, or if a editor is open, one can close the shell and start over when running the editor file. Clear an editor

[issue40711] Clearing the screen of IDLE interactive mode in Windows

2020-05-21 Thread Ezio Melotti
Ezio Melotti added the comment: The cls command only works when Python is executed within a Windows terminal. In other contexts (such as IDLE), the command doesn't work. -- assignee: terry.reedy -> ezio.melotti nosy: +ezio.melotti resolution: -> not a bug stage: -> resolved

[issue40708] Clearing the screen of IDLE interactive mode in Windows

2020-05-21 Thread Ezio Melotti
Change by Ezio Melotti : -- assignee: terry.reedy -> ezio.melotti nosy: +ezio.melotti resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Clearing the screen of IDLE interactive mode in Windows type: performa

[issue40711] Clearing the screen of IDLE interactive mode in Windows

2020-05-21 Thread Sanmitha
New submission from Sanmitha : Clearing the screen of IDLE interactive mode using the following code: import os os.system("cls") It doesn't clear the screen in Windows. Actually these two statements have no effect at all. -- Added file: https://bugs.python.org/file49178/Erro

[issue40711] Clearing the screen of IDLE interactive mode in Windows

2020-05-21 Thread Sanmitha
Change by Sanmitha : -- assignee: terry.reedy components: IDLE nosy: Sanmitha Sadhishkumar, terry.reedy priority: normal severity: normal status: open title: Clearing the screen of IDLE interactive mode in Windows type: performance versions: Python 3.5, Python 3.6, Python 3.7, Python

[issue40708] Clearing the screen of IDLE interactive mode in Windows

2020-05-21 Thread Sanmitha
Sanmitha added the comment: Clearing the screen of IDLE interactive mode using the following code: import os os.system("cls") It doesn't clear the screen in Windows -- title: Malfunctioning of '\r' -> Clearing the screen of IDLE interactive mod

use CTRL+L for clearing the screen

2012-02-29 Thread Jabba Laci
Hi, I'm working on an interactive script. With raw_input user input is read and the script produces some output and offers the prompt again. I would like to add a clear screen feature, which would be activated with CTRL+L. How to do that? Another thing: raw_input waits until Enter but I'd like to

Re: use CTRL+L for clearing the screen

2012-02-29 Thread Ben Finney
Jabba Laci jabba.l...@gmail.com writes: I would like to add a clear screen feature, which would be activated with CTRL+L. How to do that? Another thing: raw_input waits until Enter but I'd like to clear the screen at the moment when CTRL+L is pressed. That sounds like a job for the standard

Re: Clearing the screen

2006-02-15 Thread mwt
You know, for now, I just would like it to work in a standard Gnome terminal (my version is 2.12.0). -- http://mail.python.org/mailman/listinfo/python-list

Re: Clearing the screen

2006-02-15 Thread Graham
you could always use ANSI escape codes: print \\033[2J for a screen clear, or print \\022[2j \033[0;0H to clear and reset the way os.system('clear') would work. check out http://www.termsys.demon.co.uk/vtansi.htm Seems like all that mud programming came in handy after all. Graham. --

Re: Clearing the screen

2006-02-14 Thread mwt
It clears the screen by scrolling all the characters out of sight at the top of the terminal window. So the screen is blank, but not cleared in the sense that I mean it. The behavior I want is for the display to be effectively erased and ready to receive the next wave of data -- like you would do

Re: Clearing the screen

2006-02-12 Thread mwt
No guessing needed. If I just use os.system(clear) on its own, no problem. Also, if I use the magic formula you gave on its own, that works to. But in the app, (see below), neither command works. I'm missing something obvious, but I'm... missing it. def run(self, userinfo): Time when to

Re: Clearing the screen

2006-02-12 Thread mwt
Arrgghh... Is there any way to edit posts on this thing? The os.system(clear) doesn't work at all in a module. -- http://mail.python.org/mailman/listinfo/python-list

Re: Clearing the screen

2006-02-12 Thread Fredrik Lundh
mwt wrote: Arrgghh... Is there any way to edit posts on this thing? are you aware that you're posting to a usenet newsgroup? The os.system(clear) doesn't work at all in a module. works for me (as long as I'm running the code on a platform that has a clear command). in what way does it fail

Clearing the screen

2006-02-11 Thread mwt
I'm doing some python programming for a linux terminal (just learning). When I want to completely redraw the screen, I've been using os.system(clear) This command works when using python in terminal mode, and in IDLE. However, when running a little .py file containing that command, the screen

Re: Clearing the screen

2006-02-11 Thread Felipe Almeida Lessa
Em Sáb, 2006-02-11 às 12:04 -0800, mwt escreveu: I'm doing some python programming for a linux terminal (just learning). When I want to completely redraw the screen, I've been using os.system(clear) This command works when using python in terminal mode, and in IDLE. However, when running a

Re: Clearing the screen

2006-02-11 Thread mwt
I can't seem to get that to behave properly. It works fine in a python shell, like you're demonstrating it, but not as a command in a module. -- http://mail.python.org/mailman/listinfo/python-list

Re: Clearing the screen

2006-02-11 Thread Steven D'Aprano
On Sat, 11 Feb 2006 18:14:02 -0200, Felipe Almeida Lessa wrote: Em Sáb, 2006-02-11 às 12:04 -0800, mwt escreveu: I'm doing some python programming for a linux terminal (just learning). When I want to completely redraw the screen, I've been using os.system(clear) This command works when using

Re: Clearing the screen

2006-02-11 Thread Steven D'Aprano
On Sat, 11 Feb 2006 22:26:08 -0800, mwt wrote: I can't seem to get that to behave properly. It works fine in a python shell, like you're demonstrating it, but not as a command in a module. Would you like to tell us how you are using it and what happens when you do, or would you like us to

Clearing output screen

2005-11-06 Thread Ivan Shevanski
I know there is a way to do this, but google doesn't seem to want to find it =) There is a command to clear the output screen right? Thanks in advance, -Ivan -- http://mail.python.org/mailman/listinfo/python-list

Re: Clearing output screen

2005-11-06 Thread Fredrik Lundh
Ivan Shevanski wrote I know there is a way to do this, but google doesn't seem to want to find it =) There is a command to clear the output screen right? no, because output screen isn't a well-defined concept on modern operating systems. the following works in many cases: import os

Re: Clearing output screen

2005-11-06 Thread Ivan Shevanski
On 11/6/05, Fredrik Lundh [EMAIL PROTECTED] wrote: Ivan Shevanski wrote I know there is a way to do this, but google doesn't seem to want to find it =) There is a command to clear the output screen right?no, because output screen isn't a well-defined concept on modern operating systems.the

Re: Clearing the screen

2005-01-01 Thread Artur M. Piwko
In the darkest hour on Sat, 25 Dec 2004 09:41:54 +1030, Ishwor [EMAIL PROTECTED] screamed: def cls(): for i in range(1,40): print ; Slightly ot, but perhaps this'll work for you: def cls(): print \033[2J -- [ Artur M. Piwko : Pipen : AMP29-RIPE : RLU:100918 :

Customizing interpreter behavior [was: Clearing the screen]

2004-12-27 Thread Steve Holden
John Machin wrote: Ishwor wrote: i was just tinkering with it actually. ;-) In your command prompt just do Pythonwin.exe /run C:\Python24\file\PyFiles\clear.py It's not a very good idea to store your own scripts in the PythonXY directory -- other than tested working modules which you install in

Re: Clearing the screen

2004-12-25 Thread Craig Ringer
On Sat, 2004-12-25 at 07:43, Ishwor wrote: On 24 Dec 2004 15:33:26 -0800, Lars [EMAIL PROTECTED] wrote: Hi Iswor, If I understand you correctly then your program is writing output to a console/terminal window and you want to clear that window. I don't know of any library methods for

Re: Clearing the screen

2004-12-25 Thread Scott David Daniels
Nick Coghlan wrote: Jeff Epler wrote: I don't know about idle, but the real python supports the PYTHONSTARTUP environment variable. I just tried it - IDLE ignores PYTHONSTARTUP, as does PythonWin (I just started using PYTHONSTARTUP to switch the standard prompt from '' to Py'). I believe

Re: Clearing the screen

2004-12-25 Thread Ishwor
On Sun, 26 Dec 2004 01:47:42 GMT, Steven Bethard [EMAIL PROTECTED] wrote: Scott David Daniels wrote: Nick Coghlan wrote: Jeff Epler wrote: I don't know about idle, but the real python supports the PYTHONSTARTUP environment variable. I just tried it - IDLE ignores PYTHONSTARTUP,

Re: Clearing the screen

2004-12-25 Thread Ishwor
heres the shell i forgot to show PythonWin 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32. Portions Copyright 1994-2004 Mark Hammond ([EMAIL PROTECTED]) - see 'Help/About PythonWin' for further copyright information. clear.cls() [40 more lines of \n] -- cheers, Ishwor

Re: Clearing the screen

2004-12-25 Thread John Machin
Ishwor wrote: i was just tinkering with it actually. ;-) In your command prompt just do Pythonwin.exe /run C:\Python24\file\PyFiles\clear.py It's not a very good idea to store your own scripts in the PythonXY directory -- other than tested working modules which you install in

Re: Clearing the screen

2004-12-25 Thread Ishwor
On 25 Dec 2004 18:20:39 -0800, John Machin [EMAIL PROTECTED] wrote: Ishwor wrote: i was just tinkering with it actually. ;-) In your command prompt just do Pythonwin.exe /run C:\Python24\file\PyFiles\clear.py It's not a very good idea to store your own scripts in the PythonXY

Re: Clearing the screen

2004-12-25 Thread Ishwor
On Sun, 26 Dec 2004 13:07:56 +1030, Ishwor [EMAIL PROTECTED] wrote: On 25 Dec 2004 18:20:39 -0800, John Machin [EMAIL PROTECTED] wrote: Ishwor wrote: i was just tinkering with it actually. ;-) In your command prompt just do Pythonwin.exe /run C:\Python24\file\PyFiles\clear.py

Re: Clearing the screen

2004-12-24 Thread Lars
Hi Iswor, If I understand you correctly then your program is writing output to a console/terminal window and you want to clear that window. I don't know of any library methods for that, but you might just do: os.system(cls) #for windows or os.system(clear) #for unix Not the most advanced

Re: Clearing the screen

2004-12-24 Thread Ishwor
On 24 Dec 2004 15:33:26 -0800, Lars [EMAIL PROTECTED] wrote: Hi Iswor, If I understand you correctly then your program is writing output to a console/terminal window and you want to clear that window. I don't know of any library methods for that, but you might just do: well i am not doing

Re: Clearing the screen

2004-12-24 Thread Jeff Epler
I don't know about idle, but the real python supports the PYTHONSTARTUP environment variable. PYTHONSTARTUP If this is the name of a readable file, the Python commands in that file are executed before the first prompt is displayed in interactive mode. The file is executed