Date: Wed, 18 Nov 2015 20:58:46 -0800 From: Craig Rodrigues <rodrigc@FreeBSD.org> To: raviqqe <raviqqe@gmail.com> Cc: freebsd-python@freebsd.org Subject: Re: Python curses module does not print any attributed space character on FreeBSD 11-current Message-ID: <CAG=rPVdLctDFzCm7K824tkPC1dDBK=mSqkicg0Fs%2BdJJK1Nh8w@mail.gmail.com> In-Reply-To: <564D4739.1090504@gmail.com> References: <564D4739.1090504@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 18, 2015 at 7:51 PM, raviqqe <raviqqe@gmail.com> wrote: > Hello, > > TL;DR > I encountered a bug-like behavior of a Python built-in module. > Could you reproduce it in C? > > While working with Python and its curses module on FreeBSD 11-current > (x86_64), > I found a weird behavior of the module. The code below doesn't print any > character > although it should print a space on the upper-left corner. > > ``` > # test.py > > import curses > > window = curses.initscr() > window.attrset(curses.A_NORMAL) > window.addch(" ") > window.getch() > curses.endwin() > ``` > > The cause is `window.attrset()` and when I removed the line it works just > fine. > And, with the visible characters (such as 'A' and '?' except for ' ' and > '\t'), > it works fine even if window.attrset() is there. > > Hi, I have a: * FreeBSD-CURRENT system: built from Subversion revision r290830 * python27-2.710_1 (installed with pkg install lang/python ) * python35-3.5.0 (installed with pkg install lang/python35 ) I ran your test case, and did not encounter your problem. For me, a space is printed in the top left. Also, I see: # ldd /usr/local/lib/python2.7/lib-dynload/_curses.so /usr/local/lib/python2.7/lib-dynload/_curses.so: libthr.so.3 => /lib/libthr.so.3 (0x801212000) libncurses.so.8 => /lib/libncurses.so.8 (0x801437000) libpython2.7.so.1 => /usr/local/lib/libpython2.7.so.1 (0x80168a000) libc.so.7 => /lib/libc.so.7 (0x800822000) libintl.so.8 => /usr/local/lib/libintl.so.8 (0x801a48000) libutil.so.9 => /lib/libutil.so.9 (0x801c52000) libm.so.5 => /lib/libm.so.5 (0x801e65000) # ldd /usr/local/lib/python3.5/lib-dynload/_curses.so /usr/local/lib/python3.5/lib-dynload/_curses.so: libthr.so.3 => /lib/libthr.so.3 (0x801214000) libncurses.so.8 => /lib/libncurses.so.8 (0x801439000) libpython3.5m.so.1.0 => /usr/local/lib/libpython3.5m.so.1.0 (0x801800000) libc.so.7 => /lib/libc.so.7 (0x800822000) libintl.so.8 => /usr/local/lib/libintl.so.8 (0x801c9b000) libutil.so.9 => /lib/libutil.so.9 (0x801ea5000) libm.so.5 => /lib/libm.so.5 (0x8020b8000) At least for me, the Python _curses.so is linking against ncurses.so.8. -- Craig
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVdLctDFzCm7K824tkPC1dDBK=mSqkicg0Fs%2BdJJK1Nh8w>