docs: def _get_serial_ports_windows():
      '''
      Uses the Win32 registry to return a iterator of serial (COM) ports existing
      on this computer.
  
      See http://stackoverflow.com/questions/1205383/listing-serial-com-ports-on-windows
      '''
      import six.moves.winreg as winreg
  
      reg_path = 'HARDWARE\\DEVICEMAP\\SERIALCOMM'
      try:
          key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, reg_path)
      except WindowsError:
          # No serial ports. Return empty generator.
          return
  
      for i in itertools.count():
          try:
              val = winreg.EnumValue(key, i)
              yield str(val[1])
          except EnvironmentError:
              break