Date: Thu, 22 Nov 2018 13:35:04 +0300 From: Yuri Pankov <yuripv@yuripv.net> To: freebsd-questions@freebsd.org Subject: Re: Python3 problem on FreeBSD with curses Message-ID: <9c646b7e-11cb-062d-490a-5f6570807a1f@yuripv.net> In-Reply-To: <20181122102357.GA24213@sh4-5.1blu.de> References: <20181122102357.GA24213@sh4-5.1blu.de>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EKgzSk7GC6FvfJqLHgQlsXIT5lOWxlhCr Content-Type: multipart/mixed; boundary="4AwNPcQDeoTllyJsxXvztwXyGaXMmRaCO"; protected-headers="v1" From: Yuri Pankov <yuripv@yuripv.net> To: freebsd-questions@freebsd.org Message-ID: <9c646b7e-11cb-062d-490a-5f6570807a1f@yuripv.net> Subject: Re: Python3 problem on FreeBSD with curses References: <20181122102357.GA24213@sh4-5.1blu.de> In-Reply-To: <20181122102357.GA24213@sh4-5.1blu.de> --4AwNPcQDeoTllyJsxXvztwXyGaXMmRaCO Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Matthias Apitz wrote: >=20 > Hello, >=20 > I encounter a Phyton3 problem with the curses function >=20 > k =3D stdscr.get_wch() >=20 > The problem exists only on FreeBSD. The same code works nicely on any L= inux. > On FreeBSD it gives: >=20 > $ 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 wrapp= er > return func(stdscr, *args, **kwds) > File "curtest.py", line 87, in draw_menu > k =3D stdscr.get_wch() > AttributeError: '_curses.curses window' object has no attribute 'get_wc= h' >=20 > The code for curtest.py is here: http://www.unixarea.de/curtest.py=20 > It's a simple demo program which reads one char after another, prints > it in a curses window and exits on pressed 'q'. >=20 > What could be wrong with our Pythos3 on FreeBSD: >=20 > 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 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. --4AwNPcQDeoTllyJsxXvztwXyGaXMmRaCO-- --EKgzSk7GC6FvfJqLHgQlsXIT5lOWxlhCr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE+Gq3PsPeLT4tL/9wk4vgf7Eq4WwFAlv2hmcACgkQk4vgf7Eq 4Wwa0Af/QerTQVGSPWrdlTKtrdjwsQBLylMDadViGl7giXUaHqVnMiqYy+MbpYsr d9YxLMgVbWSWPOiq/cG6z+0qMa+szwPEEItVYMLUFJumWLuNAlaXausXDcm9RQRb 77F1eqdg4suXb8RI6HY+0hOgwbN1tOyfny4n8V4wd317HtXR7ndz8Gy63HekYZx2 RdK/e/JwHCV9AtSzP+260CY6kEdtdEJ622xn1QN1y41/vzZ9fsNk0W/H2AiU7Ahe KwSF7H7CkipIpVs2j/mw8bLYFNtiuV4D9mXi5NtyaTyUba7H34WfdVekdrgt/8O7 fRKANNpNlseTqDEi2p/gYE5eytkawQ== =xvcL -----END PGP SIGNATURE----- --EKgzSk7GC6FvfJqLHgQlsXIT5lOWxlhCr--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9c646b7e-11cb-062d-490a-5f6570807a1f>