def main(argv=None):
arguments = cli_common(__doc__, argv=argv)<EOL>campaign_file = arguments['<STR_LIT>']<EOL>if arguments['<STR_LIT>']:<EOL><INDENT>if osp.exists(campaign_file):<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>with open(campaign_file, '<STR_LIT:w>') as ostr:<EOL><INDENT>Generator().write(ostr)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>node = arguments.get('<STR_LIT>')<EOL>output_dir = arguments.get('<STR_LIT>')<EOL>exclude_nodes = arguments.get('<STR_LIT>')<EOL>srun_tag = arguments.get('<STR_LIT>')<EOL>driver = CampaignDriver(<EOL>campaign_file,<EOL>node=node,<EOL>output_dir=output_dir,<EOL>srun=srun_tag,<EOL>exclude_nodes=exclude_nodes,<EOL>)<EOL>driver()<EOL>if argv is not None:<EOL><INDENT>return driver<EOL><DEDENT>campaign_fd = int(arguments.get('<STR_LIT>') or <NUM_LIT:1>)<EOL>message = (osp.abspath(driver.campaign_path) + '<STR_LIT:\n>').encode()<EOL>os.write(campaign_fd, message)<EOL><DEDENT>
ben-sh entry point