def check_rez(self, strict=True):
        """
        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.
        """

        system = sys.platform

        if system == "win32":
            rez_cmd = 'rez-env rez -- echo %REZ_REZ_ROOT%'
        else:
            rez_cmd = 'rez-env rez -- printenv REZ_REZ_ROOT'

        process = subprocess.Popen(rez_cmd, stdout=subprocess.PIPE, shell=True)
        rez_path, err = process.communicate()

        if err or not rez_path:
            if strict:
                raise ImportError("Failed to find Rez as a package in the current "
                                  "environment! Try 'rez-bind rez'!")
            else:
                print >> sys.stderr, ("WARNING: Failed to find a Rez package in the current "
                                      "environment. Unable to request Rez packages.")

            rez_path = ""
        else:
            rez_path = rez_path.strip()
            print "Found Rez:", rez_path
            print "Adding Rez to system path..."
            sys.path.append(rez_path)

        return rez_path
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.