bczsalba / pytermgui

Python TUI framework with mouse support, modular widget system, customizable and rapid terminal markup language and more!
https://ptg.bczsalba.com
MIT License
2.21k stars 54 forks source link

[BUG] getch not working in InputField example #62

Closed revilo951 closed 2 years ago

revilo951 commented 2 years ago

Describe the bug The InputField example from here doesn't work, produces a NameError: name 'getch' is not defined

To Reproduce Steps to reproduce the behavior:

  1. Create python file with the contents of the example
  2. Run python file

Expected behavior keyboard inputs would be printed. note: ptg -g works as expected

System information

$ ptg --version
PyTermGUI version 6.1.0

System details:
    Python version: 3.10.4
    $TERM:          xterm-256color
    $COLORTERM:     truecolor
    Color support:  ColorSystem.TRUE
    OS Platform:    Linux-5.4.0-109-generic-x86_64-with-glibc2.31

Possible cause No idea, sorry. I wish I could be of more help. Happy to test anything you should suggest though

Possible solution As above

bczsalba commented 2 years ago

Pretend that instead of getch it says ptg.getch, lol, sorry about that. Thank you for the report!

revilo951 commented 2 years ago

No probs, thanks for clearing that up.