parameters: (args=None)
return_statement: return False
docstring: Process args, returning True if notebook is opened
docstring_summary: Process args, returning True if notebook is opened
docstring_tokens: Process args returning True if notebook is opened
function: def process_args(args=None):
      """Process args, returning True if notebook is opened"""
      from optparse import OptionParser
      usage = "usage: %prog notebook.ipynb"
      parser = OptionParser(usage=usage)
      (options, my_args) = parser.parse_args(args=args)
  
      if my_args:
          filepath = my_args[0]
          if filepath.endswith(".md") or filepath.endswith(".ipynb") or filepath.endswith(".ipynb.json"):
              if filepath.startswith("http:") or filepath.startswith("https:"):
                  ##response = urlopen(filepath)
                  ##content = response.read()
                  ##filepath = os.path.basename(filepath)
                  content = None
              else:
                  content = None
              # Switch to notebook mode (after prompt is displayed)
              open_notebook(filepath, params={}, content=content)
              return True
      return False
function_tokens: def process_args ( args = None ) : from optparse import OptionParser usage = "usage: %prog notebook.ipynb" parser = OptionParser ( usage = usage ) ( options , my_args ) = parser . parse_args ( args = args ) if my_args : filepath = my_args [ 0 ] if filepath . endswith ( ".md" ) or filepath . endswith ( ".ipynb" ) or filepath . endswith ( ".ipynb.json" ) : if filepath . startswith ( "http:" ) or filepath . startswith ( "https:" ) : ##response = urlopen(filepath) ##content = response.read() ##filepath = os.path.basename(filepath) content = None else : content = None # Switch to notebook mode (after prompt is displayed) open_notebook ( filepath , params = { } , content = content ) return True return False