mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-09 05:20:08 +01:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
24 lines
707 B
Python
24 lines
707 B
Python
|
|
config = wx.Config("FooBarApp")
|
|
|
|
# right now the current path is '/'
|
|
conf.Write("RootEntry", 1)
|
|
|
|
# go to some other place: if the group(s) don't exist, they will be created
|
|
conf.SetPath("/Group/Subgroup")
|
|
|
|
# create an entry in subgroup
|
|
conf.Write("SubgroupEntry", 3)
|
|
|
|
# '..' is understood
|
|
conf.Write("../GroupEntry", 2)
|
|
conf.SetPath("..")
|
|
|
|
if conf.ReadInt("Subgroup/SubgroupEntry", 0) != 3:
|
|
raise Exception('Invalid SubgroupEntry')
|
|
|
|
# use absolute path: it is allowed, too
|
|
if conf.ReadInt("/RootEntry", 0) != 1:
|
|
raise Exception('Invalid RootEntry')
|
|
|