Python3 problem on FreeBSD with curses

Yuri Pankov yuripv at yuripv.net
Thu Nov 22 10:35:31 UTC 2018


Matthias Apitz wrote:
> 
> 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 at r303343-amd64:/usr/obj/usr/src/sys/GENERIC  amd64

I'm not a python guy at all, but looking at the OS and python versions,
I thought it's worth mentioning that the example code you provided works
for me with python36-3.6.7 on FreeBSD 13.0-CURRENT r340744
GENERIC-NODEBUG, using C.UTF-8 locale.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20181122/838fa5c0/attachment.sig>


More information about the freebsd-questions mailing list