skip to Main Content

I want to use NULL in python as implemented in java. I came across asyncio.windows_event which contains the NULL class and it works fine on windows. However, when I tried to run the same code in Ubuntu, I got the following error:

import _winapi
       ModuleNotFoundError: No module named '_winapi'

I understand this supports only windows platform. Please can someone help me with Ubuntu’s equivalent where I can import NULL just as its possible for windows. In windows, you can import NULL as:

from asyncio.window_event import NULL

Thanks in advance.

2

Answers


  1. Chosen as BEST ANSWER

    Upon surfing the internet, I came across the python null package. I installed it by

    pip install null
    

    and import it as

    from null import Null
    

    and it worked just fine.

    There is another one called nulltype. One may install it with

    pip install nulltype
    

    and import it with

    from nulltype import NullType
    

    Although I haven't used it to test how it works I have only tried Null


  2. It would be nice to see the context of the problem. Why you need to use winapi NULL?
    Maybe you can easly solve this with standard pythons None?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search