[issue44736] '\t' Escape Sequence behaving differently.

Steven D'Aprano report at bugs.python.org
Sun Jul 25 05:23:32 EDT 2021


Steven D'Aprano <steve+python at pearwood.info> added the comment:

That's not a Python issue, that's a feature of your terminal. That's how tabs are supposed to work.

By default, most terminals set tab stops every 8 columns. Printing a tab character jumps to the next tab stop.

If you are using Linux or Mac, you can use the `tabs` command in the terminal to control where the tab stops are. This is not a Python command, it is part of your OS shell.

https://askubuntu.com/questions/63424/how-to-change-tab-width-in-terminal-in-ubuntu-10-04

https://superuser.com/questions/110421/tab-character-width-in-terminal

I don't know about the Windows Terminal. It is possible it doesn't support changing the tab stops.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44736>
_______________________________________


More information about the Python-bugs-list mailing list