From af70c1dbcba5ef2b8f637e74d6dcd25aa8848f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Fri, 4 May 2012 23:10:43 +0200 Subject: [PATCH] Make the script Python3 compatible --- plugins/genapi.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/genapi.py b/plugins/genapi.py index 5f274f6d..4d6e072e 100755 --- a/plugins/genapi.py +++ b/plugins/genapi.py @@ -70,6 +70,7 @@ r'''/* This file is generated automatically by genapi.py - do not edit. */ #ifndef GEANY_FUNCTIONS_H #define GEANY_FUNCTIONS_H + ''' if __name__ == "__main__": @@ -80,15 +81,15 @@ if __name__ == "__main__": 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)