py/gadict_spellcheck.py
changeset 693 7c50e19cd04f
parent 692 8a754a13e3b3
child 694 4457721a1a13
equal deleted inserted replaced
692:8a754a13e3b3 693:7c50e19cd04f
    73 ################################################################
    73 ################################################################
    74 
    74 
    75 if len(sys.argv) < 2:
    75 if len(sys.argv) < 2:
    76     raise Exception("Please, supply path to file...")
    76     raise Exception("Please, supply path to file...")
    77 if len(sys.argv) > 2:
    77 if len(sys.argv) > 2:
    78     raise Exception("Only one argument necessary...")
    78     raise Exception("Only one argument is necessary...")
    79 
    79 
    80 FINAME = sys.argv[1]
    80 FINAME = sys.argv[1]
    81 with io.open(FINAME, mode='r', buffering=1, encoding="utf-8") as FIN:
    81 with io.open(FINAME, mode='r', buffering=1, encoding="utf-8") as FIN:
    82     checker = GadictSpellChecker(FIN, FINAME)
    82     checker = GadictSpellChecker(FIN, FINAME)
    83     checker.check()
    83     checker.check()