def init_project_env(subject='<STR_LIT>', proj_path = None, sysencoding = "<STR_LIT:utf-8>", debug = False):
<EOL><INDENT>if not proj_path:<EOL><INDENT>try:<EOL><INDENT>executable_file_path = os.path.dirname(os.path.abspath(inspect.stack()[-<NUM_LIT:1>][<NUM_LIT:1>]))<EOL><DEDENT>except:<EOL><INDENT>executable_file_path = os.path.dirname(sys.path[<NUM_LIT:0>])<EOL><DEDENT>finally:<EOL><INDENT>proj_path = executable_file_path<EOL><DEDENT><DEDENT>p = os.path.join(proj_path,subject)<EOL>proj_conf = {<EOL>"<STR_LIT>" : sysencoding,<EOL>"<STR_LIT>" : debug,<EOL>"<STR_LIT>" : os.path.splitext(os.path.basename(subject))[<NUM_LIT:0>],<EOL>"<STR_LIT>" : os.path.join(p,"<STR_LIT>"),<EOL>"<STR_LIT:path>" : {"<STR_LIT:root>" : p,<EOL>"<STR_LIT>" : os.path.join(p,"<STR_LIT>"),<EOL>"<STR_LIT:data>" : os.path.join(p,"<STR_LIT:data>"),<EOL>"<STR_LIT>" : os.path.join(p,"<STR_LIT>"),<EOL>"<STR_LIT>" : os.path.join(p,"<STR_LIT>"),<EOL>"<STR_LIT>" : os.path.join(p,"<STR_LIT>"),<EOL>"<STR_LIT>" : os.path.join(p,"<STR_LIT:result>"),<EOL>"<STR_LIT>" : os.path.join(p,"<STR_LIT:result>","<STR_LIT>"),<EOL>"<STR_LIT>" : os.path.join(p,"<STR_LIT:result>","<STR_LIT>"),<EOL>},<EOL>}<EOL>[FileSystemUtils.mkdirs(v) for v in proj_conf["<STR_LIT:path>"].values()]    <EOL>sys.path.append(p) if os.path.isdir(p) else "<STR_LIT>"<EOL>return proj_conf<EOL><DEDENT>
Set the environment for pyrunner