Reputation: 129
I haven't found anything about this, but maybe that's because it isn't possible. But is there a way to print text to coordinates in Python? For example, if I wanted to print the string 'A' at the 3rd row and 5th column of the command window, how could I do that? I found ways to get around it and print two different strings at different coordinates using \n for rows and repeating spaces for columns, but it's just too tedious to write the code.
Upvotes: 3
Views: 7148
Reputation: 111
If you want to avoid the curses module, you can get right down to the basics by using ANSI escape sequences. A quick explanation of the relevant cursor-moving codes can be found here. These work right out of the box on Linux/Unix, for Windows you'll need the coloroma package.
For a cute, cross-platform example using this technique for animation, see here.
Upvotes: 1