[PythonCE] General questions
alexandre.delattre at enst-bretagne.fr
Mon Jan 7 12:25:58 CET 2008
> Is it possible to use this syntax:
> s = Serial(5)
>(0 = COM1, so 5 = COM6) ?
I don't think you can with the current ceserial, but you can always do something like this:
if isinstance(port, int):
port = "COM%i:" %port
elif insinstance(port, str):
if not port.endswith(":"):
port = "%s:" %port
>>/s.open() # This will pop a dialog allowing to choose which bt device to connect
>No way to automatically connect to a specific bt device?
Well, at least not the first time, but on the dialog you can check the option "Always use this device",
so further call to open will not show the dialog and use the device selected first time.
More information about the PythonCE