Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/c/h/Chiplotle-0.4/chiplotle/tools/serialtools/scan_serial_ports_windows.py   Chiplotle(Download)
def scan_serial_ports_windows( ):
   from chiplotle.tools.serialtools import scan_serial_ports_from_list
   return scan_serial_ports_from_list(range(256))
#   result = { }
#   ## keep track of previously opened ports to avoid including aliases

src/c/h/Chiplotle-0.4/chiplotle/tools/serialtools/scan_serial_ports_linux.py   Chiplotle(Download)
def scan_serial_ports_linux( ):
   from chiplotle.tools.serialtools import scan_serial_ports_from_list
   ## NOTE: there are also /dev/tty.PL2303-xxxx ports. Should we assume
   ## all /dev/tty.* devices are valid? or should we just add
   ## /dev/tty.PL* to the list? will do the former and see what happens.
   ports = glob.glob('/dev/ttyS*') + glob.glob('/dev/ttyUSB*') +\
      glob.glob('/dev/tty.*')
      #glob.glob('/dev/tty.USA*') + glob.glob('/dev/tty.KeySerial*')
   return scan_serial_ports_from_list(ports)