wasm-demo/demo/ermis-f/python_m/cur/1554

63 lines
2.0 KiB
Plaintext

From: roger.burnham at gte.net (Roger Burnham)
Date: Tue, 13 Apr 1999 20:16:07 GMT
Subject: Using SioModule.zip under Win32
References: <7f06ds$hmb$1@nnrp1.dejanews.com>
Message-ID: <7f07k6$88l$1@news-1.news.gte.net>
Content-Length: 1714
X-UID: 1554
On Tue, 13 Apr 1999 19:37:33 GMT, jwinkelman at my-dejanews.com wrote:
>I have downloaded the SIO-151.ZIP to do some serial IO under Win32.
>
>Does anyone know if it can handle port numbers higher than COM9?
>
>I tried modifying the dictionary in the serial.py file to add constants for
>COM10, etc., but when I load the module, I get a NameError for COM10.
>
>Being new to python, I'm not sure where to go from here.
>
>Any help is appreciated.
>
The DLL that Sio wraps, from
MarshallSoft Computing, Inc.
POB 4543 Huntsville AL 35815. 205-881-4630.
Email: mike at marshallsoft.com
www.marshallsoft.com
only defines constants up to COM9, but they are simple integers.
No idea if it will break anything in the WSC32.dll, but you could try:
PythonWin 1.5.2b2 (#0, Mar 4 1999, 16:07:53) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
Portions Copyright 1994-1999 Mark Hammond (MHammond at skippinet.com.au)
>>> import Serial
>>> cfg = Serial.PortDict()
>>> cfg._dict['port'] = 9 # should be COM10...
>>> fd = Serial.Port(cfg)
>>> fd.open()
Traceback (innermost last):
File "<interactive input>", line 0, in ?
File "Serial.py", line 343, in open
self._chkSioExec(SioReset, (port, self._bufSize,self.cfg['txBufSize']))
File "Serial.py", line 326, in _chkSioExec
raise SioError, '%s: %s' % (func.__name__, SioErrorText(status))
SioError: SioReset: No such port
>>>
Roger Burnham
Cambridge Research & Instrumentation
rburnham at cri-inc.com
http://www.cri-inc.com/
http://starship.python.net/crew/roger/
PGP Key: http://www.nai.com/default_pgp.asp
PGP Fingerprint: 5372 729A 9557 5F36 177F 084A 6C64 BE27 0BC4 CF2D