Module Import alias Import alias FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq NameLoad Num body Raise Call AttributeLoad NameLoad attr Return NameLoad decorator_list Import alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Num Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameStore AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call BinOpMult NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad For NameStore NameLoad body If CompareEq NameLoad Num body Break Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpBitAnd NameLoad Num Return Call AttributeLoad Str attr NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore ListLoad TupleLoad Str NameLoad TupleLoad Str NameLoad TupleLoad Str NameLoad TupleLoad Str BinOpMult NameLoad Num FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad Str attr ListComp BinOpMod Str NameLoad comprehension NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num Call AttributeLoad Str attr ListComp BinOpMod Str NameLoad comprehension NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore ListLoad TupleLoad Str NameLoad TupleLoad Str NameLoad TupleLoad Str NameLoad TupleLoad Str NameLoad FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Num Num Num Num FunctionDef arguments args defaults body Assign NameStore Call BinOpMult NameLoad Num Assign NameStore Call NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num While Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad body AugAssignAdd NameStore Num Assign NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Num NameLoad NameLoad Assign NameStore Call NameLoad Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad If Call AttributeLoad Call NameLoad NameLoad attr Str body Continue Assign NameStore Call NameLoad Num If UnaryOpNot Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpSub Call AttributeLoad NameLoad attr NameLoad Num NameLoad body If UnaryOpNot Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpSub Call AttributeLoad NameLoad attr NameLoad Num NameLoad body If CompareNotEq Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad AttributeLoad NameLoad attr If NameLoad body If Call AttributeLoad NameLoad attr Num body Assign NameStore BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Num orelse Assign NameStore BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad Num If UnaryOpNot Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad BinOpSub Call AttributeLoad NameLoad attr NameLoad Num NameLoad body Expr Yield TupleLoad Call NameLoad NameLoad Str NameLoad orelse Expr Yield TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad decorator_list If CompareEq NameLoad Str body Import alias For TupleStore NameStore NameStore NameStore Call NameLoad Call NameLoad body Print BinOpMod Str TupleLoad NameLoad NameLoad NameLoad
N/A N/A ctypes N/A re ValidHandle N/A N/A value func arguments N/A N/A N/A N/A value 0 N/A N/A N/A N/A ctypes WinError N/A value N/A N/A serial serial.win32 ULONG_PTR is_64bit ctypes.wintypes HANDLE ctypes.wintypes BOOL ctypes.wintypes HWND ctypes.wintypes DWORD ctypes.wintypes WORD ctypes.wintypes LONG ctypes.wintypes ULONG ctypes.wintypes LPCSTR ctypes.wintypes HKEY ctypes.wintypes BYTE N/A NULL 0 N/A HDEVINFO N/A ctypes c_void_p N/A PCTSTR N/A ctypes c_char_p N/A PTSTR N/A ctypes c_void_p N/A CHAR N/A ctypes c_char N/A LPDWORD PDWORD N/A N/A ctypes POINTER DWORD N/A LPBYTE PBYTE N/A ctypes c_void_p N/A ACCESS_MASK DWORD N/A REGSAM ACCESS_MASK byte_buffer N/A N/A length N/A N/A N/A Get a buffer for a string N/A N/A N/A BYTE length N/A string N/A N/A buffer N/A N/A N/A s N/A N/A c buffer N/A N/A N/A c 0 N/A N/A N/A N/A N/A s append N/A chr N/A c 255 N/A N/A N/A join s N/A GUID N/A N/A ctypes Structure N/A N/A _fields_ N/A N/A Data1 DWORD N/A Data2 WORD N/A Data3 WORD N/A Data4 N/A BYTE 8 __str__ N/A N/A self N/A N/A N/A N/A {%08x-%04x-%04x-%s-%s} N/A N/A self Data1 N/A self Data2 N/A self Data3 N/A N/A join N/A N/A %02x d N/A d N/A N/A self Data4 N/A 2 N/A N/A join N/A N/A %02x d N/A d N/A N/A self Data4 N/A 2 N/A N/A SP_DEVINFO_DATA N/A N/A ctypes Structure N/A N/A _fields_ N/A N/A cbSize DWORD N/A ClassGuid GUID N/A DevInst DWORD N/A Reserved ULONG_PTR __str__ N/A N/A self N/A N/A N/A N/A ClassGuid:%s DevInst:%s N/A N/A self ClassGuid N/A self DevInst N/A N/A N/A PSP_DEVINFO_DATA N/A N/A ctypes POINTER SP_DEVINFO_DATA N/A PSP_DEVICE_INTERFACE_DETAIL_DATA N/A ctypes c_void_p N/A setupapi N/A N/A N/A ctypes windll LoadLibrary setupapi N/A SetupDiDestroyDeviceInfoList N/A setupapi SetupDiDestroyDeviceInfoList N/A N/A SetupDiDestroyDeviceInfoList argtypes N/A HDEVINFO N/A N/A SetupDiDestroyDeviceInfoList restype BOOL N/A SetupDiClassGuidsFromName N/A setupapi SetupDiClassGuidsFromNameA N/A N/A SetupDiClassGuidsFromName argtypes N/A PCTSTR N/A N/A ctypes POINTER GUID DWORD PDWORD N/A N/A SetupDiClassGuidsFromName restype BOOL N/A SetupDiEnumDeviceInfo N/A setupapi SetupDiEnumDeviceInfo N/A N/A SetupDiEnumDeviceInfo argtypes N/A HDEVINFO DWORD PSP_DEVINFO_DATA N/A N/A SetupDiEnumDeviceInfo restype BOOL N/A SetupDiGetClassDevs N/A setupapi SetupDiGetClassDevsA N/A N/A SetupDiGetClassDevs argtypes N/A N/A N/A ctypes POINTER GUID PCTSTR HWND DWORD N/A N/A SetupDiGetClassDevs restype HDEVINFO N/A N/A SetupDiGetClassDevs errcheck ValidHandle N/A SetupDiGetDeviceRegistryProperty N/A setupapi SetupDiGetDeviceRegistryPropertyA N/A N/A SetupDiGetDeviceRegistryProperty argtypes N/A HDEVINFO PSP_DEVINFO_DATA DWORD PDWORD PBYTE DWORD PDWORD N/A N/A SetupDiGetDeviceRegistryProperty restype BOOL N/A SetupDiGetDeviceInstanceId N/A setupapi SetupDiGetDeviceInstanceIdA N/A N/A SetupDiGetDeviceInstanceId argtypes N/A HDEVINFO PSP_DEVINFO_DATA PTSTR DWORD PDWORD N/A N/A SetupDiGetDeviceInstanceId restype BOOL N/A SetupDiOpenDevRegKey N/A setupapi SetupDiOpenDevRegKey N/A N/A SetupDiOpenDevRegKey argtypes N/A HDEVINFO PSP_DEVINFO_DATA DWORD DWORD DWORD REGSAM N/A N/A SetupDiOpenDevRegKey restype HKEY N/A advapi32 N/A N/A N/A ctypes windll LoadLibrary Advapi32 N/A RegCloseKey N/A advapi32 RegCloseKey N/A N/A RegCloseKey argtypes N/A HKEY N/A N/A RegCloseKey restype LONG N/A RegQueryValueEx N/A advapi32 RegQueryValueExA N/A N/A RegQueryValueEx argtypes N/A HKEY LPCSTR LPDWORD LPDWORD LPBYTE LPDWORD N/A N/A RegQueryValueEx restype LONG N/A DIGCF_PRESENT 2 N/A DIGCF_DEVICEINTERFACE 16 N/A INVALID_HANDLE_VALUE 0 N/A ERROR_INSUFFICIENT_BUFFER 122 N/A SPDRP_HARDWAREID 1 N/A SPDRP_FRIENDLYNAME 12 N/A DICS_FLAG_GLOBAL 1 N/A DIREG_DEV 1 N/A KEY_READ 131097 N/A Ports N/A N/A serial to_bytes N/A 80 111 114 116 115 N/A PortName N/A N/A serial to_bytes N/A 80 111 114 116 78 97 109 101 comports N/A N/A N/A N/A N/A GUIDs N/A N/A GUID 8 N/A guids_size N/A DWORD N/A N/A N/A SetupDiClassGuidsFromName Ports GUIDs N/A N/A ctypes sizeof GUIDs N/A N/A ctypes byref guids_size N/A N/A N/A N/A ctypes WinError N/A index N/A range N/A guids_size value N/A N/A g_hdi N/A SetupDiGetClassDevs N/A N/A ctypes byref N/A GUIDs N/A index None NULL DIGCF_PRESENT N/A devinfo N/A SP_DEVINFO_DATA N/A N/A devinfo cbSize N/A N/A ctypes sizeof devinfo N/A index 0 N/A N/A SetupDiEnumDeviceInfo g_hdi index N/A N/A ctypes byref devinfo N/A N/A index 1 N/A hkey N/A SetupDiOpenDevRegKey g_hdi N/A N/A ctypes byref devinfo DICS_FLAG_GLOBAL 0 DIREG_DEV KEY_READ N/A port_name_buffer N/A byte_buffer 250 N/A port_name_length N/A ULONG N/A N/A ctypes sizeof port_name_buffer N/A N/A RegQueryValueEx hkey PortName None None N/A N/A ctypes byref port_name_buffer N/A N/A ctypes byref port_name_length N/A N/A RegCloseKey hkey N/A N/A N/A N/A string port_name_buffer startswith LPT N/A N/A N/A szHardwareID N/A byte_buffer 250 N/A N/A N/A SetupDiGetDeviceInstanceId g_hdi N/A N/A ctypes byref devinfo N/A N/A ctypes byref szHardwareID N/A N/A N/A ctypes sizeof szHardwareID 1 None N/A N/A N/A N/A SetupDiGetDeviceRegistryProperty g_hdi N/A N/A ctypes byref devinfo SPDRP_HARDWAREID None N/A N/A ctypes byref szHardwareID N/A N/A N/A ctypes sizeof szHardwareID 1 None N/A N/A N/A N/A N/A ctypes GetLastError ERROR_INSUFFICIENT_BUFFER N/A N/A N/A N/A ctypes WinError N/A szHardwareID_str N/A string szHardwareID N/A N/A N/A szHardwareID_str startswith USB N/A N/A m N/A N/A re search VID_([0-9a-f]{4})&PID_([0-9a-f]{4})(\\(\w+))? szHardwareID_str N/A re I N/A m N/A N/A N/A N/A m group 4 N/A N/A szHardwareID_str N/A USB VID:PID=%s:%s SNR=%s N/A N/A N/A m group 1 N/A N/A m group 2 N/A N/A m group 4 N/A N/A szHardwareID_str N/A USB VID:PID=%s:%s N/A N/A N/A m group 1 N/A N/A m group 2 N/A szFriendlyName N/A byte_buffer 250 N/A N/A N/A SetupDiGetDeviceRegistryProperty g_hdi N/A N/A ctypes byref devinfo SPDRP_FRIENDLYNAME None N/A N/A ctypes byref szFriendlyName N/A N/A N/A ctypes sizeof szFriendlyName 1 None N/A N/A N/A N/A N/A string port_name_buffer n/a szHardwareID_str N/A N/A N/A N/A N/A string port_name_buffer N/A string szFriendlyName szHardwareID_str N/A N/A SetupDiDestroyDeviceInfoList g_hdi N/A N/A N/A __name__ __main__ N/A N/A serial N/A N/A port desc hwid N/A sorted N/A comports N/A N/A N/A %s: %s [%s] N/A port desc hwid