(self)
Create a new USB context.
Create a new USB context.
Create a new USB context .
def __init__(self):
        """
        Create a new USB context.
        """
        # Used to prevent an exit to cause a segfault if a concurrent thread
        # is still in libusb.
        self.__context_refcount = 0
        self.__context_cond = threading.Condition()
        context_p = libusb1.libusb_context_p()
        result = libusb1.libusb_init(byref(context_p))
        if result:
            raise libusb1.USBError(result)
        self.__context_p = context_p
def __init__ ( self ) : # Used to prevent an exit to cause a segfault if a concurrent thread # is still in libusb. self . __context_refcount = 0 self . __context_cond = threading . Condition ( ) context_p = libusb1 . libusb_context_p ( ) result = libusb1 . libusb_init ( byref ( context_p ) ) if result : raise libusb1 . USBError ( result ) self . __context_p = context_p