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()
self.__context_p = libusb1.libusb_context_p()
self.__hotplug_callback_dict = {}
self.__close_set = WeakSet()
评论列表
文章目录