all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#24954: [PATCH] Support Python 3
@ 2016-11-16 14:16 Syohei YOSHIDA
  2016-12-10 22:00 ` Justin Timmons
  0 siblings, 1 reply; 4+ messages in thread
From: Syohei YOSHIDA @ 2016-11-16 14:16 UTC (permalink / raw)
  To: 24954; +Cc: Syohei YOSHIDA

'print' statement was removed at Python 3. 'print' function should be
used instead of 'print' statement.
---
 modules/modhelp.py | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/modules/modhelp.py b/modules/modhelp.py
index 5d8f89b..d9a6312 100755
--- a/modules/modhelp.py
+++ b/modules/modhelp.py
@@ -45,31 +45,31 @@ def cmd_test(args):
 
     failed = []
     for m in mods:
-        print '[*] %s: ------- start -------' % m
-        print '[*] %s: running make' % m
+        print('[*] %s: ------- start -------' % m)
+        print('[*] %s: running make' % m)
         r = sp.call(make_cmd, cwd=m)
         if r != 0:
-            print '[E] %s: make failed' % m
+            print('[E] %s: make failed' % m)
             failed += [m]
             continue
 
-        print '[*] %s: running test' % m
+        print('[*] %s: running test' % m)
         testpath = os.path.join(m, 'test.el')
         if os.path.isfile(testpath):
             emacs_cmd = [EMACS, '-batch', '-L', '.', '-l', 'ert',
                          '-l', testpath, '-f', 'ert-run-tests-batch-and-exit']
-            print ' '.join(emacs_cmd)
+            print(' '.join(emacs_cmd))
             r = sp.call(emacs_cmd)
             if r != 0:
-                print '[E] %s: test failed' % m
+                print('[E] %s: test failed' % m)
                 failed += [m]
                 continue
         else:
-            print '[W] %s: no test to run' % m
+            print('[W] %s: no test to run' % m)
 
-    print '\n[*] %d/%d MODULES OK' % (len(mods)-len(failed), len(mods))
+    print('\n[*] %d/%d MODULES OK' % (len(mods)-len(failed), len(mods)))
     for m in failed:
-        print '\tfailed: %s' % m
+        print('\tfailed: %s' % m)
 
 def to_lisp_sym(sym):
     sym = re.sub('[_ ]', '-', sym)
@@ -81,7 +81,7 @@ def to_c_sym(sym):
 
 def cmd_init(args):
     if os.path.exists(args.module):
-        print "%s: file/dir '%s' already exists" % (__file__, args.module)
+        print("%s: file/dir '%s' already exists" % (__file__, args.module))
         return
 
     os.mkdir(args.module)
@@ -98,10 +98,10 @@ def cmd_init(args):
         if isinstance(path, string.Template):
             path = path.substitute(template_vars)
         path = os.path.join(args.module, path)
-        print "writing %s..." % path
+        print("writing %s..." % path)
         with open(path, "w+") as f:
             f.write(t.substitute(template_vars))
-    print "done! you can run %s test %s" % (__file__, args.module)
+    print("done! you can run %s test %s" % (__file__, args.module))
 
 
 def main():
-- 
2.9.3






^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-03 15:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-16 14:16 bug#24954: [PATCH] Support Python 3 Syohei YOSHIDA
2016-12-10 22:00 ` Justin Timmons
2017-04-04  1:42   ` npostavs
2017-12-03 15:50   ` Noam Postavsky

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.