New submission from Dude Roast <akshayd...@gmail.com>:

Whenever I try to use Backspace(\b) it always prints square boxes instead of 
deleting previous string.

Code Down:- 

import pyautogui
print("Press Ctrl+c to quit")

try:
    while True:
        x,y = pyautogui.position();
        positionStr = "X: " + str(x).rjust(4) + " Y: " + str(y).rjust(4)
        print(positionStr,end ='')
        print('\b'*len(positionStr),end='',flush=True)
        
except KeyboardInterrupt:
    print("\nDone")


O/P:- 

Press Ctrl+c to quit
X:  317 Y:  261X:  317 Y:  261X:  317 Y:  
261X:  317 Y:  261X:  317 Y:  
261X:  317 Y:  261X:  317 Y:  
261X:  317 Y:  261X:  317 Y:  
261X:  317 Y:  261X:  317 Y:  
261X:  317 Y:  261X:  317 Y:  261
Done

----------
assignee: terry.reedy
components: IDLE
files: mousenow.py
messages: 334394
nosy: Dude Roast, terry.reedy
priority: normal
severity: normal
status: open
title: Backspace not working
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48079/mousenow.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35833>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to