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)