Python ncurses fix

Fixes #451