def parse_cli_args():
<EOL>home_path = os.path.expanduser("<STR_LIT>")<EOL>xdg_home_path = os.environ.get("<STR_LIT>", "<STR_LIT>".format(home_path))<EOL>xdg_dirs_path = os.environ.get("<STR_LIT>", "<STR_LIT>")<EOL>try:<EOL><INDENT>with open(os.devnull, "<STR_LIT:w>") as devnull:<EOL><INDENT>command = ["<STR_LIT>", "<STR_LIT>"]<EOL>i3status_path = (<EOL>subprocess.check_output(command, stderr=devnull).decode().strip()<EOL>)<EOL><DEDENT><DEDENT>except subprocess.CalledProcessError:<EOL><INDENT>i3status_path = None<EOL><DEDENT>with open(os.devnull, "<STR_LIT:w>") as devnull:<EOL><INDENT>if subprocess.call(["<STR_LIT>", "<STR_LIT>"], stdout=devnull) == <NUM_LIT:0>:<EOL><INDENT>wm = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>wm = "<STR_LIT>"<EOL><DEDENT><DEDENT>i3status_config_file_candidates = [<EOL>"<STR_LIT>".format(xdg_home_path),<EOL>"<STR_LIT>".format(xdg_home_path),<EOL>"<STR_LIT>".format(xdg_home_path),  <EOL>"<STR_LIT>".format(home_path),<EOL>"<STR_LIT>".format(home_path),  <EOL>"<STR_LIT>".format(xdg_dirs_path),<EOL>"<STR_LIT>",<EOL>]<EOL>for fn in i3status_config_file_candidates:<EOL><INDENT>if os.path.isfile(fn):<EOL><INDENT>i3status_config_file_default = fn<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>i3status_config_file_default = i3status_config_file_candidates[<NUM_LIT:3>]<EOL><DEDENT>class Parser(argparse.ArgumentParser):<EOL><INDENT>def error(self, message):<EOL><INDENT>print("<STR_LIT>".format(message))<EOL>self.print_help()<EOL>self.exit(<NUM_LIT:1>)<EOL><DEDENT>def _check_value(self, action, value):<EOL><INDENT>if action.choices is not None and value not in action.choices:<EOL><INDENT>raise argparse.ArgumentError(<EOL>action, "<STR_LIT>".format(value)<EOL>)<EOL><DEDENT><DEDENT><DEDENT>class HelpFormatter(argparse.ArgumentDefaultsHelpFormatter):<EOL><INDENT>def _format_action_invocation(self, action):<EOL><INDENT>metavar = self._format_args(action, action.dest.upper())<EOL>return "<STR_LIT>".format("<STR_LIT:U+002CU+0020>".join(action.option_strings), metavar)<EOL><DEDENT><DEDENT>parser = Parser(<EOL>description="<STR_LIT>",<EOL>formatter_class=HelpFormatter,<EOL>)<EOL>parser.add_argument(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>action="<STR_LIT:store_true>",<EOL>dest="<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>)<EOL>parser.add_argument(<EOL>"<STR_LIT:-c>",<EOL>"<STR_LIT>",<EOL>action="<STR_LIT:store>",<EOL>default=i3status_config_file_default,<EOL>dest="<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>metavar="<STR_LIT>",<EOL>type=str,<EOL>)<EOL>parser.add_argument(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>action="<STR_LIT:store_true>",<EOL>help="<STR_LIT>",<EOL>)<EOL>parser.add_argument(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>action="<STR_LIT:store_true>",<EOL>dest="<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>)<EOL>parser.add_argument(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>action="<STR_LIT>",<EOL>dest="<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>metavar="<STR_LIT>",<EOL>)<EOL>parser.add_argument(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>action="<STR_LIT:store>",<EOL>dest="<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>metavar="<STR_LIT>",<EOL>type=str,<EOL>)<EOL>parser.add_argument(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>action="<STR_LIT:store_true>",<EOL>dest="<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>)<EOL>parser.add_argument(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>action="<STR_LIT:store>",<EOL>default=<NUM_LIT>,<EOL>dest="<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>metavar="<STR_LIT>",<EOL>type=int,<EOL>)<EOL>parser.add_argument(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>action="<STR_LIT:store_true>",<EOL>dest="<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>)<EOL>parser.add_argument(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>action="<STR_LIT:store>",<EOL>default=i3status_path,<EOL>dest="<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>metavar="<STR_LIT>",<EOL>type=str,<EOL>)<EOL>parser.add_argument(<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>action="<STR_LIT:store_true>",<EOL>dest="<STR_LIT>",<EOL>help="<STR_LIT>",<EOL>)<EOL>parser.add_argument(<EOL>"<STR_LIT>",<EOL>action="<STR_LIT:store>",  <EOL>dest="<STR_LIT>",<EOL>metavar="<STR_LIT>",<EOL>default=wm,<EOL>choices=["<STR_LIT>", "<STR_LIT>"],<EOL>help="<STR_LIT>",<EOL>)<EOL>parser.add_argument("<STR_LIT>", "<STR_LIT>", help=argparse.SUPPRESS)<EOL>options = parser.parse_args()<EOL>options.python_version = python_version()<EOL>options.version = version<EOL>if options.print_version:<EOL><INDENT>msg = "<STR_LIT>"<EOL>print(msg.format(**vars(options)))<EOL>parser.exit()<EOL><DEDENT>options.wm_name = options.wm<EOL>options.wm = {<EOL>"<STR_LIT>": {"<STR_LIT>": "<STR_LIT>", "<STR_LIT>": "<STR_LIT>"},<EOL>"<STR_LIT>": {"<STR_LIT>": "<STR_LIT>", "<STR_LIT>": "<STR_LIT>"},<EOL>}[options.wm]<EOL>if not options.i3status_path:<EOL><INDENT>options.i3status_path = "<STR_LIT>"<EOL><DEDENT>if not options.include_paths:<EOL><INDENT>options.include_paths = [<EOL>"<STR_LIT>".format(xdg_home_path),<EOL>"<STR_LIT>".format(xdg_home_path),<EOL>"<STR_LIT>".format(xdg_home_path),<EOL>"<STR_LIT>".format(home_path),<EOL>]<EOL><DEDENT>include_paths = []<EOL>for path in options.include_paths:<EOL><INDENT>path = os.path.abspath(path)<EOL>if os.path.isdir(path) and os.listdir(path):<EOL><INDENT>include_paths.append(path)<EOL><DEDENT><DEDENT>options.include_paths = include_paths<EOL>del options.interval<EOL>del options.print_version<EOL>options.minimum_interval = <NUM_LIT:0.1>  <EOL>options.click_events = not options.__dict__.pop("<STR_LIT>")<EOL>return options<EOL>
Parse the command line arguments