I'm making Tetris game with Python in Linux, but I can't move terminal cursor to what I want to position
How can move cursor position?? in Python
I'm making Tetris game with Python in Linux, but I can't move terminal cursor to what I want to position
How can move cursor position?? in Python
This seems like a duplicate, however referring to this answer, it appears that you should be using the colorama module to make this task easier and after doing so you should be able to move your cursor around by simply using
def move (y, x):
print("\033[%d;%dH" % (y, x))
sys.stdout.write()
instead of print()
–
Percaline © 2022 - 2024 — McMap. All rights reserved.