Hi.
In the application that I'm writing, I'd like to store the current
configuration. So I created a wxConfig object with:
cfg = wxConfig('My App', 'My Company')
On Windows, this works fine. Having a look in the registry, I can see
the Key "My App" under "My Company".
However, on Linux nothing is created. To get wxConfig to work, I've got
to use:
cfg = wxConfig('My App', 'My Company', 'local-cfg-file')
Now $HOME has a file called 'local-cfg-file'. But that's no good, since
this file is not "hidden" (ie. it doesn't start with a period (.)).
Further, on Windows I've now got a registry called "local-cfg-file" and
no longer a key 'My App' with a sub key of 'My Company'.
Up to now, I've got one question: Why do I have to specify a local file
name on Linux? The documentatition says:
Some config classes require a local filename. If this is not present,
but required, the application name will be used instead.
Why wasn't the application name used?
Further, if I'm running on Linux, I'd like the local configuration file
to be created hidden. So it should start with a period (.). But doing:
cfg = wxConfig('My App', 'My Company', '.local-cfg-file')
creates a registry key on Windows with the name ".local-cfg-file" (which
was to be expected).
Do I have to special case creating the cfg object when I'm on Linux?
Reading the documentation of wxConfig and wxConfigBase I'd expect that I
don't have to special case anything. And in fact, for the tiny app that
I'm writing, this would be the only special case I'd have to introduce
I don't have a Mac - how would I have to special case this, so that the
cfg is created the way a Mac user would expect it?
Am I doing something wrong, or is this really the way it is supposed to
work?
Windows:
- Python 2.2.2 #37
- wxPython 2.3.3.1 (according to __version__.py)
- wxWindows 2.3.4
Linux:
- Python 2.2.2 #2
- wxPython 2.4.0.2
- wxGTK 2.3.2
Thanks,
Alexander Skwar
···
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.iso-top.biz | Jabber: askwar@a-message.de
iso-top.biz - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 6 hours 17 minutes