From 56d90f3fef4a5849ec848d142a280cada3324b18 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Mon, 9 Jan 2023 20:33:30 +0100 Subject: [PATCH] dictdDBs.wordnet: use open() in python3 instead of file() from python2 --- pkgs/servers/dict/wordnet_structures.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 pkgs/servers/dict/wordnet_structures.py diff --git a/pkgs/servers/dict/wordnet_structures.py b/pkgs/servers/dict/wordnet_structures.py old mode 100644 new mode 100755 index 7aada092baad..bfb07c53dc6e --- a/pkgs/servers/dict/wordnet_structures.py +++ b/pkgs/servers/dict/wordnet_structures.py @@ -307,13 +307,13 @@ if (__name__ == '__main__'): for i in range(0,len(args),2): print('Opening index file %r...' % args[i]) - file_index = file(args[i]) + file_index = open(args[i]) print('Opening data file %r...' % args[i+1]) - file_data = file(args[i+1]) + file_data = open(args[i+1]) print('Parsing index file and data file...') wnd.wn_dict_add(file_index, file_data) print('All input files parsed. Writing output to index file %r and data file %r.' % (options.oi, options.od)) - wnd.dict_generate(file(options.oi, 'w'),file(options.od, 'w')) + wnd.dict_generate(open(options.oi, 'w'),open(options.od, 'w')) print('All done.')