4from pathlib
import Path
6from ._native
import mxvk
12 def __init__(self, path: str | Path |
None =
None) ->
None:
14 self.
native = mxvk.Config()
if path
is None else mxvk.Config(str(path))
16 def get(self, section: str, key: str, default: str =
"") -> str:
18 return self.
native.item_at_key(section, key, default).value
20 def set(self, section: str, key: str, value: str) ->
None:
22 self.
native.set_item(section, key, value)
24 def load(self, path: str | Path) ->
None:
26 self.
native.load_file(str(path))
28 def save(self, path: str | Path) ->
None:
30 self.
native.save_file(str(path))
None __init__(self, str|Path|None path=None)
A small INI-style MXVK settings file.
None set(self, str section, str key, str value)
None load(self, str|Path path)
str get(self, str section, str key, str default="")
None save(self, str|Path path)
native
Create empty settings or load them from path.