pmbarrett314 / curses-menu

A simple console menu system in python using the curses library
MIT License
471 stars 55 forks source link

[Windows] Subclass of ExternalItem does not show any print() output #38

Closed MCOfficer closed 2 years ago

MCOfficer commented 5 years ago

Consider this simple snippet:

class TestItem(ExternalItem):
    def action(self):
        print("Foo")
        input("press enter")

menu = CursesMenu()
menu.append_item(TestItem("this is a test item"))
menu.show()

instead of the expected output, all i get is a blank terminal window. however, the \<enter> keystroke still registers and sends me back to the main menu. 2018-10-20_14-31-49 Note: It doesn't matter how long i wait.

The curious thing about this is that,

a) the same code works on linux: 2018-10-20_14-30-37 and b) CommandItem, which from my understanding does basically the same, works on linux and windows.

i'm running curses-menu 0.5.0 on python 3.7, windows 10. curses is curses‑2.2‑cp37‑cp37m‑win_amd64 from here. if anyone could test this on other operating setups and/or look deeper into this problem, it'd be much appreciated.