summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/findnocoding.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/scripts/findnocoding.py')
-rwxr-xr-xTools/scripts/findnocoding.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Tools/scripts/findnocoding.py b/Tools/scripts/findnocoding.py
index 28a299a..ade4390 100755
--- a/Tools/scripts/findnocoding.py
+++ b/Tools/scripts/findnocoding.py
@@ -28,8 +28,8 @@ except:
pysource = pysource()
- print >>sys.stderr, ("The pysource module is not available; "
- "no sophisticated Python source file search will be done.")
+ print("The pysource module is not available; "
+ "no sophisticated Python source file search will be done.", file=sys.stderr)
decl_re = re.compile(r"coding[=:]\s*([-\w.]+)")
@@ -79,8 +79,8 @@ usage = """Usage: %s [-cd] paths...
try:
opts, args = getopt.getopt(sys.argv[1:], 'cd')
except getopt.error as msg:
- print >>sys.stderr, msg
- print >>sys.stderr, usage
+ print(msg, file=sys.stderr)
+ print(usage, file=sys.stderr)
sys.exit(1)
is_python = pysource.looks_like_python
@@ -93,12 +93,12 @@ for o, a in opts:
debug = True
if not args:
- print >>sys.stderr, usage
+ print(usage, file=sys.stderr)
sys.exit(1)
for fullpath in pysource.walk_python_files(args, is_python):
if debug:
- print "Testing for coding: %s" % fullpath
+ print("Testing for coding: %s" % fullpath)
result = needs_declaration(fullpath)
if result:
- print fullpath
+ print(fullpath)