import os
os.mkdir("test")
f = open("test/_test.sass","w")
f.write(".test")
f.close()
f = open("test/__test.pug","w")
f.write("section.test")
f.close()
import os
name = input('Введи имя секции: ')
folder_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), name)
folder_path_n = os.path.join(os.path.dirname(os.path.abspath(__file__)))
if not os.path.isdir(folder_path):
os.mkdir(folder_path)
with open(os.path.join(folder_path, f'_{name}.sass'), 'w', encoding='utf-8')as f:
f.write('.test')
with open(os.path.join(folder_path, f'{name}.pug'), 'w', encoding='utf-8') as f:
f.write('section.test')
with open(os.path.join(folder_path_n, 'common.sass'), 'r', encoding='utf-8') as ct:
cmr = ct.read()
ct.close()
with open(os.path.join(folder_path_n, 'common.sass'), 'w', encoding='utf-8') as f:
f.write(f'{cmr}\n@import {name}/_{name}')