[Python-3000-checkins] r66392 - python/branches/py3k/Lib/lib2to3/main.py

benjamin.peterson python-3000-checkins at python.org
Thu Sep 11 23:05:25 CEST 2008


Author: benjamin.peterson
Date: Thu Sep 11 23:05:25 2008
New Revision: 66392

Log:
make lib2to3/main.py syntax py3k valid

Modified:
   python/branches/py3k/Lib/lib2to3/main.py

Modified: python/branches/py3k/Lib/lib2to3/main.py
==============================================================================
--- python/branches/py3k/Lib/lib2to3/main.py	(original)
+++ python/branches/py3k/Lib/lib2to3/main.py	Thu Sep 11 23:05:25 2008
@@ -39,19 +39,19 @@
     refactor_stdin = False
     options, args = parser.parse_args(args)
     if options.list_fixes:
-        print "Available transformations for the -f/--fix option:"
+        print("Available transformations for the -f/--fix option:")
         for fixname in refactor.get_all_fix_names(fixer_pkg):
-            print fixname
+            print(fixname)
         if not args:
             return 0
     if not args:
-        print >>sys.stderr, "At least one file or directory argument required."
-        print >>sys.stderr, "Use --help to show usage."
+        print("At least one file or directory argument required.", file=sys.stderr)
+        print("Use --help to show usage.", file=sys.stderr)
         return 2
     if "-" in args:
         refactor_stdin = True
         if options.write:
-            print >>sys.stderr, "Can't write to stdin."
+            print("Can't write to stdin.", file=sys.stderr)
             return 2
 
     # Set up logging handler


More information about the Python-3000-checkins mailing list