summaryrefslogtreecommitdiffstats
path: root/pygame/profiledb.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygame/profiledb.py')
-rw-r--r--pygame/profiledb.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/pygame/profiledb.py b/pygame/profiledb.py
new file mode 100644
index 0000000..190d401
--- /dev/null
+++ b/pygame/profiledb.py
@@ -0,0 +1,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']