1

I am writing code in python shell when I enough writing code prompt(that angle bracket goes to bottom of the shell which is quite difficult to record something with that).

Check this image how my angle bracket are in the bottom of the shell

prompt is in bottom of Python shell

prompt is in bottom of Python shell

What I want is angle bracket prompt is in the middle of Python shell

angle bracket prompt is in the middle of python shell

Is there's any setting or shortcut to make my prompt to move upward and put it in middle of shell? It's quite easy in CMD where I use slide which is in right side, but that things not working in Python IDLE.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
  • [Clear Python IDE Window](https://stackoverflow.com/questions/1432480/any-way-to-clear-pythons-idle-window). My bad, this should fix your issue. – Yoshikage Kira Apr 24 '21 at 08:05
  • 2
    let me be more specific , when i use cmd in windows 10 (as soon as prompt go to the bottom of the cmd I used CTRL + downward arrow ) so prompt goes upside (it's not clearing anything ) but when i trying to do same in python shell it's not working – Azhar Uddin Sheikh Apr 24 '21 at 08:08
  • You could use Python in interactive mode from a CMD window - just type `python` (or `python3` if your executable is called that). – kaya3 Apr 24 '21 at 11:55

1 Answers1

1

I understand what you mean about using the scrollbar on the right side of Windows CommandPrompt. But a Windows console and the tkinter text widget used by IDLE operate completely differently. CommandPrompt has a fixed number of lines, limited in width, that start blank. That fixed number defaults to 300. It can be increased up to 9999. After printing that fixed number, printing more lines replaces existing lines. The Tk/Tkinter text has a variable number of lines, starting with 0 and expanding indefinitely as lines are entered. (I have gone over 500_000.) So there is literally nothing on or below the prompt line until you enter it or until Python outputs lines while compiling or executing your code. One cannot scroll up the prompt when there is nothing below the prompt to appear on the screen.

Terry Jan Reedy
  • 18,414
  • 3
  • 40
  • 52