[geany/geany] af70c1: Make the script Python3 compatible

Enrico Tröger git-noreply at xxxxx
Fri May 4 21:10:43 UTC 2012


Branch:      refs/heads/master
Author:      Enrico Tröger <enrico.troeger at uvena.de>
Committer:   Enrico Tröger <enrico.troeger at uvena.de>
Date:        Fri, 04 May 2012 21:10:43
Commit:      af70c1dbcba5ef2b8f637e74d6dcd25aa8848f6b
             https://github.com/geany/geany/commit/af70c1dbcba5ef2b8f637e74d6dcd25aa8848f6b

Log Message:
-----------
Make the script Python3 compatible


Modified Paths:
--------------
    plugins/genapi.py

Modified: plugins/genapi.py
9 files changed, 5 insertions(+), 4 deletions(-)
===================================================================
@@ -70,6 +70,7 @@ def get_api_tuple(source):
 
 #ifndef GEANY_FUNCTIONS_H
 #define GEANY_FUNCTIONS_H
+
 '''
 
 if __name__ == "__main__":
@@ -80,15 +81,15 @@ def get_api_tuple(source):
         sys.exit("No function names read!")
 
     f = open(outfile, 'w')
-    print >> f, header % (outfile)
+    f.write(header % (outfile))
 
     for fname in fnames:
         ptr, name = get_api_tuple(fname)
         # note: name no longer needed
-        print >> f, '#define %s \\\n\tgeany_functions->%s->%s' % (fname, ptr, fname)
+        f.write('#define %s \\\n\tgeany_functions->%s->%s\n' % (fname, ptr, fname))
 
-    print >> f, '\n#endif'
+    f.write('\n#endif\n')
     f.close()
 
     if not '-q' in sys.argv:
-        print 'Generated ' + outfile
+        sys.stdout.write('Generated %s\n' % outfile)


@@ Diff output truncated at 100000 characters. @@


--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).



More information about the Commits mailing list