瀏覽代碼

Add odict.csv

Sergienko Anton 7 年之前
父節點
當前提交
7eab2cccb3
共有 2 個文件被更改,包括 76 次插入0 次删除
  1. 64 0
      src/odict.csv
  2. 12 0
      src/program_efremova.py

File diff suppressed because it is too large
+ 64 - 0
src/odict.csv


+ 12 - 0
src/program_efremova.py

@@ -6,6 +6,7 @@ import time
 import os
 
 dictionary_filename = 'efremova.txt'
+dictionary_forms_filename = 'odict.csv'
 json_filename = 'data.json'
 
 
@@ -31,6 +32,17 @@ def if_exist_json(func):
     return wrapper
 
 
+def if_exist_dictionary_forms(func):
+    def wrapper(*original_args, **original_kwargs):
+        file = Path(dictionary_forms_filename)
+        if not file.is_file():
+            print('Файл {} не существует. Функция не может быть выполнена'.format(dictionary_filename))
+            return
+        func(*original_args, **original_kwargs)
+
+    return wrapper
+
+
 def function_execution_time(func):
     def wrapper(*original_args, **original_kwargs):
         start = time.time()

Some files were not shown because too many files changed in this diff