blob: 190d401ef586d983d7e262444b8c3677fb4094d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
from pathlib import Path
import yaml
class ProfileDB:
def __init__(self):
with Path('~/games/.saves/profiles.yaml').expanduser().open() as fp:
self.profiledb = yaml.safe_load(fp)
def get_profiles(self):
# currently contains {name, display}
return self.profiledb['profiles']
|