Source code for popsynth.utils.package_data
from pathlib import Path
import pkg_resources
[docs]def get_path_of_data_file(data_file) -> Path:
file_path = pkg_resources.resource_filename("popsynth",
"data/%s" % data_file)
return Path(file_path)
[docs]def get_path_of_log_dir() -> Path:
p: Path = Path("~/.log/popsynth").expanduser()
if not p.exists():
p.mkdir(parents=True)
return p