Refactoring: rename file names.
--- a/py/gadict_c5.py Sun Mar 27 23:57:43 2016 +0300
+++ b/py/gadict_c5.py Sun Mar 27 23:59:21 2016 +0300
@@ -4,25 +4,25 @@
import sys
-fgadict = None
-fnout = None
+finame = None
+foname = None
if len(sys.argv) >= 2:
- fgadict = sys.argv[1]
+ finame = sys.argv[1]
if len(sys.argv) >= 3:
- fnout = sys.argv[2]
+ foname = sys.argv[2]
-fin = io.open(fgadict, mode='r', buffering=1, encoding="utf-8")
-if fnout is None:
+fin = io.open(finame, mode='r', buffering=1, encoding="utf-8")
+if foname is None:
fout = sys.stdout
else:
- fout = open(fnout, "w")
+ fout = open(foname, "w")
parser = gadict.Parser()
try:
dom = parser.parse(fin)
except gadict.ParseException as ex:
- sys.stdout.write("{:s}{:s}\n".format(fgadict, repr(ex)))
+ sys.stdout.write("{:s}{:s}\n".format(finame, repr(ex)))
if __debug__:
import traceback
traceback.print_exc()