def get_executables(self,normalise=True):
        """Yield a normalised Executable instance for each script to be frozen.

        If "normalise" is True (the default) then the user-provided scripts
        will be rewritten to decode any non-filename items specified as part
        of the script, and to include the esky startup code.  If the freezer
        has a better way of doing these things, it should pass normalise=False.
        """
        if normalise:
            if not os.path.exists(os.path.join(self.tempdir,"scripts")):
                os.mkdir(os.path.join(self.tempdir,"scripts"))
        if self.distribution.has_scripts():
            for s in self.distribution.scripts:
                if isinstance(s,Executable):
                    exe = s
                else:
                    exe = Executable(s)
                if normalise:
                    #  Give the normalised script file a name matching that
                    #  specified, since some freezers only take the filename.
                    name = exe.name
                    if sys.platform == "win32" and name.endswith(".exe"):
                        name = name[:-4]
                    if exe.endswith(".pyw"):
                        ext = ".pyw"
                    else:
                        ext = ".py"
                    script = os.path.join(self.tempdir,"scripts",name+ext)
                    #  Get the code for the target script.
                    #  If it's a single string then interpret it as a filename,
                    #  otherwise feed it into the _obj2code logic.
                    if isinstance(exe.script,basestring):
                        with open(exe.script,"rt") as f:
                            code = f.read()
                    else:
                        code = self._obj2code(exe.script)
                    #  Check that the code actually compiles - sometimes it
                    #  can be hard to get a good message out of the freezer.
                    compile(code,"","exec")
                    #  Augment the given code with special esky-related logic.
                    with open(script,"wt") as fOut:
                        lines = (ln+"\n" for ln in code.split("\n"))
                        #  Keep any leading comments and __future__ imports
                        #  at the start of the file.
                        for ln in lines:
                            if ln.strip():
                                if not ln.strip().startswith("#"):
                                    if ln not in "__future__":
                                        break
                            fOut.write(ln)
                        #  Run the startup hooks before any actual code.
                        if not self.dont_run_startup_hooks:
                            fOut.write("import esky\n")
                            fOut.write("esky.run_startup_hooks()\n")
                            fOut.write("\n")
                        #  Then just include the rest of the script code.
                        fOut.write(ln)
                        for ln in lines:
                            fOut.write(ln)
                    new_exe = Executable(script)
                    new_exe.__dict__.update(exe.__dict__)
                    new_exe.script = script
                    exe = new_exe
                yield exe
dataset/ETHPy150Open cloudmatrix/esky/esky/bdist_esky/__init__.py/bdist_esky.get_executables/swapped operands of `not in`