You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
532 B
Python

from yaml import load, parse, dump
class ConfEnv:
def _getUserConf():
from re import search, IGNORECASE
from os import listdir, environ
from os.path import exists, joins
from pathlib import Path
from platform import system
cfgFileRegex = r'((config|cfg)\.(((ya?)ml)|(conf|cfg))'
work = Path.home()
if system=='Linux':
for fname in work.iterdir():
if type(search(cfgFileRegex,fname.name, flags=IGNORECASE))!=None: