Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python code to cause a backspace keystroke?

I keep finding ways to map the backspace key differently, but that's not what I'm after.

I'm in a program writing a python code, and basically I want to write a line of code that causes the program to think someone just hit the Backspace key in the GUI (as the backspace key deletes something)

How I would code in a backspace key stroke?

like image 975
aescript Avatar asked Aug 19 '13 18:08

aescript


1 Answers

and i got it !

print('\b ', end="", flush=True) 
sys.stdout.write('\010')

it backspace !

like image 107
Thanasis Valto Kourpetis Avatar answered Nov 13 '22 05:11

Thanasis Valto Kourpetis