This Patch allows pyserial to find keyspan USB devices on Mac OS X automatically. --md@hudora.de --- /Users/md/Desktop/pyserial-2.0b2/serial/serialposix.py Wed Oct 1 04:28:12 2003 +++ serial/serialposix.py Thu Oct 9 15:16:12 2003 @@ -44,12 +44,16 @@ elif plat[:3] == 'bsd' or \ plat[:6] == 'netbsd' or \ plat[:7] == 'freebsd' or \ - plat[:7] == 'openbsd' or \ - plat[:6] == 'darwin': #BSD (confirmed for freebsd4: cuaa%d) + plat[:7] == 'openbsd': #BSD (confirmed for freebsd4: cuaa%d) def device(port): return '/dev/cuaa%d' % port -elif plat[:4] == 'irix': #IRIX® (not tested) +elif plat[:6] == 'darwin': + def device(port): # tested with keyspan USP-to-serial adapters + # others might use /dev/tty.usbserialXX + return '/dev/cu.USA19QW%sP1.1' % ('1' * (port + 1)) + +elif plat[:4] == 'irix': #IRIX (not tested) def device(port): return '/dev/ttyf%d' % port