def save_as(self, pyc_filename):
        "save_as(pyc_filename) ... Save current code object to .pyc file."

        assert isinstance(self.__code, new.code)
        assert isinstance(pyc_filename, str) and pyc_filename
        assert pyc_filename.endswith('.pyc')

        # Skip if the file was already updated.
        if self.__modified(self.src_filename, pyc_filename):

            # Output dump the code object to .pyc file.
            pyc = open(pyc_filename, 'wb')
            pyc.write(imp.get_magic())
            pyc.write(struct.pack('<l', time.time()))
            marshal.dump(self.__code, pyc)
            pyc.close()

        assert os.path.isfile(pyc_filename)
        assert os.path.getsize(pyc_filename) > 0
save_as(pyc_filename) ... Save current code object to .pyc file.
recipes/Python/435694_Evaluate_upperletters_variable_name_constants/recipe-435694.py