Date: Thu, 22 Nov 2018 11:23:57 +0100 From: Matthias Apitz <guru@unixarea.de> To: freebsd-questions@freebsd.org Subject: Python3 problem on FreeBSD with curses Message-ID: <20181122102357.GA24213@sh4-5.1blu.de>
next in thread | raw e-mail | index | archive | help
Hello,
I encounter a Phyton3 problem with the curses function
k = stdscr.get_wch()
The problem exists only on FreeBSD. The same code works nicely on any Linux.
On FreeBSD it gives:
$ python3 curtest.py
Traceback (most recent call last):
File "curtest.py", line 93, in <module>
main()
File "curtest.py", line 90, in main
curses.wrapper(draw_menu)
File "/usr/local/lib/python3.5/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "curtest.py", line 87, in draw_menu
k = stdscr.get_wch()
AttributeError: '_curses.curses window' object has no attribute 'get_wch'
The code for curtest.py is here: http://www.unixarea.de/curtest.py
It's a simple demo program which reads one char after another, prints
it in a curses window and exits on pressed 'q'.
What could be wrong with our Pythos3 on FreeBSD:
FreeBSD r314251-amd64 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r314251: Sat
Feb 25 17:14:40 CET 2017
root@r303343-amd64:/usr/obj/usr/src/sys/GENERIC amd64
Thanks
matthias
--
Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181122102357.GA24213>
