summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/findnocoding.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-03 17:06:41 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-03 17:06:41 (GMT)
commit6afaeb757af0dbd8508a0f2352ade61e41bec84c (patch)
treef1b31bc7138b17ff39791bbb45aa81583c3b6e46 /Tools/scripts/findnocoding.py
parente5d0e8431f929cad2da77b63fe1b7dc0ff21a428 (diff)
downloadcpython-6afaeb757af0dbd8508a0f2352ade61e41bec84c.zip
cpython-6afaeb757af0dbd8508a0f2352ade61e41bec84c.tar.gz
cpython-6afaeb757af0dbd8508a0f2352ade61e41bec84c.tar.bz2
Convert print statements to function calls in Tools/.
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)