Function parse_cli_args

Synopsis

def parse_cli_args(raw_args=None)

Description

Parses command line input arguments. If raw_args is None, sys.argv is parsed

Source

Lines 60-71 in anyfig/anyfig_setup.py.

def parse_cli_args(raw_args=None):
  ''' Parses command line input arguments. If raw_args is None, sys.argv is parsed '''
  class NullIO(StringIO):
    def write(self, txt):
      pass

  sys.stdout = NullIO()
  args = fire.Fire(lambda **kwargs: kwargs, command=raw_args)
  sys.stdout = sys.__stdout__
  return args







Add Discussion as Guest

Log in