On Tue, 10 Jan 2023 03:21:11 -0600 Nate Bargmann <n...@n0nb.us> wrote:
> * On 2023 09 Jan 22:05 -0600, pa...@quillandmouse.com wrote: > > Folks: > > I'm not python curses expert, but is what I found. > > > I'm trying to write some code in Python's curses module. I've run > > into common curses items like A_NORMAL which don't exist. When I do > > a print(curses.version), it shows "b 2.2". This tells me that the > > Debian (testing) version of python curses is version 2.2. The > > documentation for python curses at docs.python.org mentions > > versions up to 3.10. > > Presumably you're running Bullseye as am I. Here is what I show: I'm actually on testing. The Python version is 3.10.x > > Python 3.9.2 (default, Feb 28 2021, 17:03:44) > [GCC 10.2.1 20210110] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> import curses > >>> print(curses.version) > b'2.2' > >>> dir() > ['__annotations__', '__builtins__', '__doc__', '__loader__', > '__name__', '__package__', '__spec__', 'curses'] > >>> dir(curses) > [...(snip lots of stuff), 'A_NORMAL', (snip even more stuff)] > > >>> curses.A_NORMAL > 0 > >>> curses.A_PROTECT > 16777216 > >>> curses.A_BOLD > 2097152 > >>> curses.A_COLOR > 65280 > > Do you get similar values for those constants? What you wrote triggered something. I'd been following the Python curses docs, which tell you to write, for example, "A_REVERSE". And Python was throwing exceptions. But based on what you wrote, I substituted "curses.A_REVERSE", which works. Problem solved... for now. Paul -- Paul M. Foster Personal Blog: http://noferblatz.com Company Site: http://quillandmouse.com Software Projects: https://gitlab.com/paulmfoster