diff --git a/src/build/file2str.py b/src/build/file2str.py index b23c16618af..2b420eef339 100644 --- a/src/build/file2str.py +++ b/src/build/file2str.py @@ -26,7 +26,7 @@ else: try: myfile = open(srcfile, 'rb') except IOError: - print("Unable to open source file '%s'" % srcfile) + sys.stderr.write("Unable to open source file '%s'\n" % srcfile) sys.exit(-1) byteCount = os.path.getsize(srcfile) @@ -56,5 +56,5 @@ try: dst.write('\n};\n') dst.close() except IOError: - print("Unable to open output file '%s'" % dstfile) + sys.stderr.write("Unable to open output file '%s'\n" % dstfile) sys.exit(-1) diff --git a/src/build/makelist.py b/src/build/makelist.py index a25012515ec..15c0ac9b605 100644 --- a/src/build/makelist.py +++ b/src/build/makelist.py @@ -10,7 +10,7 @@ def parse_file(srcfile): try: fp = open(srcfile, 'rb') except IOError: - print("Unable to open source file '%s'" % srcfile) + sys.stderr.write("Unable to open source file '%s'\n" % srcfile) return 1 in_comment = 0 linenum = 0 diff --git a/src/emu/cpu/h8/h8make.py b/src/emu/cpu/h8/h8make.py index 8328ddb56b1..4cd435df373 100644 --- a/src/emu/cpu/h8/h8make.py +++ b/src/emu/cpu/h8/h8make.py @@ -15,7 +15,7 @@ def name_to_type(name): return 2 if name == "s26": return 3 - print "Unknown chip type name %s" % name + sys.stderr.write("Unknown chip type name %s\n" % name) sys.exit(1) def type_to_device(dtype): @@ -96,7 +96,7 @@ class Hash: if val in self.d: h = self.d[val] if h.premask != premask: - print "Premask conflict" + sys.stderr.write("Premask conflict\n") sys.exit(1) return h h = Hash(premask) @@ -105,7 +105,7 @@ class Hash: def set(self, val, opc): if val in self.d: - print "Collision on %s" % opc.description() + sys.stderr.write("Collision on %s\n" % opc.description()) sys.exit(1) self.d[val] = opc @@ -331,7 +331,7 @@ class OpcodeList: if v in h.d: d = h.d[v] if not d.is_dispatch(): - print "Collision on %s" % opc.description() + sys.stderr.write("Collision on %s\n" % opc.description()) sys.exit(1) if opc.enabled: d.enabled = True diff --git a/src/regtests/chdman/chdtest.py b/src/regtests/chdman/chdtest.py index ed16a1f7780..78ed7cbe746 100644 --- a/src/regtests/chdman/chdtest.py +++ b/src/regtests/chdman/chdtest.py @@ -121,15 +121,15 @@ else: chdmanBin = os.path.normpath(os.path.join(currentDirectory, "..", "..", "..", "chdman")) if not os.path.exists(chdmanBin): - print chdmanBin + " does not exist" + sys.stderr.write(chdmanBin + " does not exist\n") sys.exit(1) if not os.path.exists(inputPath): - print inputPath + " does not exist" + sys.stderr.write(inputPath + " does not exist\n") sys.exit(1) if not os.path.exists(outputPath): - print outputPath + " does not exist" + sys.stderr.write(outputPath + " does not exist\n") sys.exit(1) if os.path.exists(tempPath):