def copy_file(self, source, target, preserve_mode=True):

        if match_patterns(source, build_py27_unmodified):
            _build_py.copy_file(self, source, target, preserve_mode)
        elif match_patterns(source, build_py27_excluded):
            print(source % "excluding: %s")
        elif source.endswith('.py'):
            try:
                print("3to2 converting: %s => %s" % (source, target))
                with open(source, 'rt') as input:
                    # ensure file contents have trailing newline
                    source_content = input.read() + "\n"
                    nval = self.rtool.refactor_string(source_content, source)
                if nval is not None:
                    with open(target, 'wt') as output:
                        output.write('from __future__ import print_function\n')
                        output.write(str(nval))
                else:
                    raise(Exception("Failed to parse: %s" % source))
            except Exception as e:
                print("3to2 error (%s => %s): %s" % (source,target,e))
dataset/ETHPy150Open Arelle/Arelle/setup.py/build_py27.copy_file/swapped operands of `%`