So i wanna create game engine with python. Running on command prompt.
I wanna know what method an draw a single pixel to command prompt.
The curses may help you doing so, here's a quick example drawing a diagonal of points:
import time
import curses
window = curses.initscr()
for x in range(30):
window.addch(x, x, ".")
window.refresh()
time.sleep(1)
curses.endwin()
Keep in mind that the terminal has a character resolution: you won't be able to place pixels at any places.
But you can trick by using other chars than a dot, see for example the bb demo:
apt install bb
DISPLAY= bb
(cleaning the DISPLAY variable to force it to run inside your terminal)