Ask coding questions

← Back to all posts
How do I change the text cursor in my Python outputs?
ZacharyRude (7)

In all of my text-based Python programs, the text cursor in the output is shown as a big, white rectangle rather than the traditional blinking vertical line. I want to know how to switch from the solid rectangle to the blinking vertical line. This option is not in the Setting menu, so how do I change the (text) cursor?

Comments
hotnewtop
Wumi4 (541)

Well, it depends on the terminal, not the shell. Some terminal (like the GNOME Terminal) allows you to change the terminal cursor. But as far as I know, you cannot change the terminal cursor in the Repl terminal.

ZacharyRude (7)

@Wumi4 I do know that crosh (the terminal that comes preinstalled on Chrome OS) allows you to change the terminal cursor.

Coder100 (18915)

you can't, replit uses xterm, and xterm has that cursor, and replit can't configure it (at least I couldn't)

Saml2020 (66)

That is how Linux termals work, since each character is the same width. You cannot change that.

ZacharyRude (7)

@Saml2020 In IDLE's Python shell, despite being terminal-based, the text cursor is a blinking vertical line rather than a rectangle. If that Python shell is terminal-based, then how did they change the text cursor in that Python shell?

ch1ck3n (2380)

@ZacharyRude they made their own shell

Wumi4 (541)

@ZacharyRude Do you have an image for that? I have searched for the IDLE Python shell cursor, but still don't found any image that has the cursor.

ZacharyRude (7)

@Wumi4 I found an image that has that cursor.
Here it is:

Saml2020 (66)

@ZacharyRude That's the custom Python terminal, but since Replit uses the Linux terminal, you are unable to change that unless you code a custom terminal.