Re: Python curses
On Tue, Jan 10, 2023 at 08:24:11AM -0500, paulf@quillandmouse.com wrote:
> 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.
I'm a Python novice, but I believe what you're seeing is the difference
between
import curses
and
from curses import *
Compare and contrast:
unicorn:~$ python3
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 re
>>> re.sub('a*', '', 'aardvark')
'rdvrk'
unicorn:~$ python3
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.
>>> from re import *
>>> sub('a*', '', 'aardvark')
'rdvrk'
Reply to: