From owner-freebsd-questions@freebsd.org Thu Nov 22 10:24:07 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4058A11446AD for ; Thu, 22 Nov 2018 10:24:07 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from smh-06.1blu.de (smh-06.1blu.de [178.254.0.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 835B8706BB for ; Thu, 22 Nov 2018 10:24:06 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from [172.16.29.5] (helo=sh4-5.1blu.de) by smh-06.1blu.de with esmtp (Exim 4.86_2) (envelope-from ) id 1gPm9N-0007y9-HS for freebsd-questions@freebsd.org; Thu, 22 Nov 2018 11:23:57 +0100 Received: from ftp51246-2575596 by sh4-5.1blu.de with local (Exim 4.86_2) (envelope-from ) id 1gPm9N-0007OA-Dy for freebsd-questions@freebsd.org; Thu, 22 Nov 2018 11:23:57 +0100 Date: Thu, 22 Nov 2018 11:23:57 +0100 From: Matthias Apitz To: freebsd-questions@freebsd.org Subject: Python3 problem on FreeBSD with curses Message-ID: <20181122102357.GA24213@sh4-5.1blu.de> Reply-To: Matthias Apitz Mail-Followup-To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Operating-System: FreeBSD 12.0-CURRENT r314251 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. User-Agent: Mutt/1.5.24 (2015-08-30) X-Rspamd-Queue-Id: 835B8706BB X-Spamd-Result: default: False [2.19 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[guru@unixarea.de]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.48)[0.484,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[unixarea.de]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[mail.unixarea.de]; NEURAL_SPAM_LONG(0.39)[0.393,0]; NEURAL_SPAM_MEDIUM(0.42)[0.424,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:42730, ipnet:178.254.0.0/19, country:DE]; IP_SCORE(-0.00)[country: DE(-0.01)] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2018 10:24:07 -0000 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 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