def run(path, tasks):
<EOL>readable_path = make_readable_path(path)<EOL>if not os.path.isfile(path):<EOL><INDENT>logger.log(logger.red("<STR_LIT>"), logger.magenta(readable_path))<EOL>sys.exit(-<NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>logger.log("<STR_LIT>", logger.magenta(readable_path))<EOL><DEDENT>try:<EOL><INDENT>runpy.run_path(path, None, "<STR_LIT>")<EOL><DEDENT>except Exception as e:<EOL><INDENT>traceback.print_exc(file=sys.stdout)<EOL>logger.log(logger.red("<STR_LIT>"))<EOL>sys.exit(-<NUM_LIT:1>)<EOL><DEDENT>for name in tasks:<EOL><INDENT>pylp.start(name)<EOL><DEDENT>loop = asyncio.get_event_loop()<EOL>loop.run_until_complete(wait_and_quit(loop))<EOL>
Run a pylpfile.