So I just installed Urwid and as a test tried running the Urwid equivalent of a basic print command, as given as an example on the Urwid website tutorial. I received an error message.
I tried running a different one of the examples and received a similar error message. The code looks like this:
import urwid
txt = urwid.Text(u"Hello World")
fill = urwid.Filler(txt, 'top')
loop = urwid.MainLoop(fill)
loop.run()
It should print 'Hello World' in the top left corner of the screen and then run until instructed to quit. Instead I get this error message:
Traceback (most recent call last):
File "C:\Users\Rory Kranz\AppData\Local\atom\app-1.34.0\testingg", line 5, in <module>
loop = urwid.MainLoop(fill)
File "C:\Users\Rory Kranz\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urwid\main_loop.py", line 114, in __init__
screen = raw_display.Screen()
File "C:\Users\Rory Kranz\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urwid\raw_display.py", line 92, in __init__
fcntl.fcntl(self._resize_pipe_rd, fcntl.F_SETFL, os.O_NONBLOCK)
NameError: name 'fcntl' is not defined
Did something go wrong with the installation, or is there something else I need to install in order to get Urwid to work?