GetComState DCB setting EvtChar
Mark Hammond
MarkH at ActiveState.com
Mon May 14 18:40:20 EDT 2001
jj wrote:
> if I change param to : dcb.EvtChar = '\r'
> SystemError: bad memberlist type
I can not repro this. The following program:
--
from win32file import *
import win32con
port = "COM1"
handle = CreateFile(port,
win32con.GENERIC_READ | win32con.GENERIC_WRITE,
0, # exclusive access
None, # no security
win32con.OPEN_EXISTING,
win32con.FILE_ATTRIBUTE_NORMAL | win32con.FILE_FLAG_OVERLAPPED,
None)
dcb = GetCommState( handle )
dcb.EvtChar = '\r'
dcb.ErrorChar = '\n'
print "worked"
--
prints "worked" when run.
The Help files are wrong here - they say "integer" for these member. I
have changed the help files, but the code seems fine from here...
Mark.
More information about the Python-list
mailing list