I have a device connected to COM31. And the code that I need to create a serial connection looks very simple
port = 31
trex_serial = serial.Serial(port - 1, baudrate=19200, stopbits=serial.STOPBITS_ONE, timeout=1)
The foollowing code works when I run it using Python2.6, but when executed by IronPython2.6.1, this is what I get:
Traceback (most recent call last):
File "c:\Python26\lib\site-packages\serial\serialutil.py", line 188, in __init__
File "c:\Python26\lib\site-packages\serial\serialutil.py", line 236, in setPort
File "c:\Python26\lib\site-packages\serial\serialcli.py", line 139, in makeDeviceName
File "c:\Python26\lib\site-packages\serial\serialcli.py", line 17, in device
IndexError: index out of range: 30
I am not sure what is going on. PySerial clearly says that it is IronPython compliant. Any ideas what am I doing wrong?