We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eaa963d commit c79a8d3Copy full SHA for c79a8d3
1 file changed
workbook/actions.py
@@ -25,7 +25,6 @@ def get_problem_info(workbook_url):
25
ret = []
26
while True:
27
x = txt.find(pattern)
28
- print(x)
29
if x == -1: break
30
txt = txt[x+9:]
31
prob_id, prob_name = '', ''
@@ -64,8 +63,9 @@ def gen_ind_workbook(attrs, category):
64
63
category_idx = category[chapter_idx].index(prob_id)
65
file_path = solution_path + prob_id
66
if not os.path.exists(file_path + '.java'):
67
- with open(file_path + '.java', 'w', encoding="UTF-8") as f:
68
- f.write(txt)
+ os.makedirs(os.path.dirname(file_path), exist_ok=True) # 디렉토리 없으면 생성
+ with open(file_path + '.java', 'w', encoding="UTF-8") as f:
+ f.write(txt)
69
try:
70
codes = open(file_path + '.java', 'r', encoding="UTF-8").read()
71
except: # EUC-KR -> UTF-8
0 commit comments