def _GetCommModemStatus(self): stat = win32.DWORD() win32.GetCommModemStatus(self.hComPort, ctypes.byref(stat)) return stat.value
def _GetCommModemStatus(self): if not self.is_open: raise portNotOpenError stat = win32.DWORD() win32.GetCommModemStatus(self._port_handle, ctypes.byref(stat)) return stat.value