parameters: (self, url)
docstring: extract host and port from an URL string
docstring_summary: extract host and port from an URL string
docstring_tokens: extract host and port from an URL string
function: def fromURL(self, url):
          """extract host and port from an URL string"""
          if url.lower().startswith("hwgrep://"): url = url[9:]
          # use a for loop to get the 1st element from the generator
          for port, desc, hwid in serial.tools.list_ports.grep(url):
              return port
          else:
              raise serial.SerialException('no ports found matching regexp %r' % (url,))
function_tokens: def fromURL ( self , url ) : if url . lower ( ) . startswith ( "hwgrep://" ) : url = url [ 9 : ] # use a for loop to get the 1st element from the generator for port , desc , hwid in serial . tools . list_ports . grep ( url ) : return port else : raise serial . SerialException ( 'no ports found matching regexp %r' % ( url , ) )