def check_rez(self, strict=True):
system = sys.platform<EOL>if system == "<STR_LIT:win32>":<EOL><INDENT>rez_cmd = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>rez_cmd = '<STR_LIT>'<EOL><DEDENT>process = subprocess.Popen(rez_cmd, stdout=subprocess.PIPE, shell=True)<EOL>rez_path, err = process.communicate()<EOL>if err or not rez_path:<EOL><INDENT>if strict:<EOL><INDENT>raise ImportError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>print(("<STR_LIT>"<EOL>"<STR_LIT>"), file=sys.stderr)<EOL><DEDENT>rez_path = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>rez_path = rez_path.strip()<EOL>print("<STR_LIT>", rez_path)<EOL>print("<STR_LIT>")<EOL>sys.path.append(rez_path)<EOL><DEDENT>return rez_path<EOL>
Checks to see if a Rez package is available in the current environment.
If it is available, add it to the system path, exposing the Rez Python API

:param strict: (bool) If True, raise an error if Rez is not available as a package.
                      This will prevent the app from being launched.

:returns: A path to the Rez package.