core: some tweaks for better colour handling when we're redirecting stdout/stderr

This commit is contained in:
Dima Gerasimov 2023-06-21 19:56:33 +01:00 committed by karlicoss
parent 6f6be5c78e
commit c25ab51664
3 changed files with 8 additions and 3 deletions

View file

@ -1,5 +1,8 @@
from pathlib import Path
# todo preinit isn't really a good name? it's only in a separate file because
# - it's imported from my.core.init (so we wan't to keep this file as small/reliable as possible, hence not common or something)
# - we still need this function in __main__, so has to be separate from my/core/init.py
def get_mycfg_dir() -> Path:
import appdirs
import os