pystudent
pystudent

Reputation: 571

Change specific character in terminal

After searching the internet quite a bit, I haven't found any simple solution for my kind of problem.

Is it possible to change a specific character in the terminal in python?

For example, lets say i have a 40 x 40 matrix filled with spaces and there is one dot in the middle. is it possible to move the dot (i.e. delete it and put it somewhere else) without clearing the whole terminal and loading the new state of the matrix?

Upvotes: 1

Views: 308

Answers (2)

rafaelc
rafaelc

Reputation: 59274

The short answer is No.
If you are trying to make a game, you should use a library or engine that will reload the canvas some n times per second, but you can`t reload a terminal output.

Upvotes: 1

Related Questions