A configuration file to improve customization #3

Merged
kairoto merged 4 commits from config-file into develop 2026-09-21 20:49:52 +00:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit fb2479c65d - Show all commits

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"defaultDirectoryName":"NewProject", "defaultDirectoryName":"NP",
"defaultFileName":"main.py", "defaultFileName":"main.py",
"defaultPreset":"", "defaultPreset":"",
"presetPath":"./presets" "presetPath":"./presets"
+2 -1
View File
@@ -33,7 +33,8 @@ if __name__ == '__main__' :
presetContent = '' presetContent = ''
presetFile = Path().cwd().joinpath(f"{config['presetPath']}/{args.file_preset}.py") presetFile = Path().cwd().joinpath(f"{config['presetPath']}/{args.file_preset}.py")
if not presetFile.exists() and args.file_preset == '' : if args.file_preset != '' :
if not presetFile.exists() :
raise Exception(f"Preset {args.file_preset} does not exist!") raise Exception(f"Preset {args.file_preset} does not exist!")
else : else :
presetContent = presetFile.read_text() presetContent = presetFile.read_text()