If the gnome_config key does not exist, None is returned (that is the None
object -- not the string "None"). This is equivalent to the C NULL
constant. You should be able to use one of:
if gnome.config.get_string("/App/Section/Setting") == None:
if not gnome.config.get_string("/App/Section/Setting"):
James.
--
Email: [EMAIL PROTECTED]
WWW: http://www.daa.com.au/~james/
On Mon, 1 Nov 1999, Edward Muller wrote:
> I just tried something like this:
>
> if gnome.config.get_string("/App/Section/Setting") == "None":
> writedefaults()
>
>
> it didn't work.
>
> this did:
>
> if str(gnome.config.get_string("/App/Section/Setting")) == "None":
> writedefaults()
>
> I had to cast the return from gnome.config.get_string as a string to
> make it work.
>
> So it brings up the question of what type does gnome.config.get_string
> return....I checked the gnome.config source code and all it is doing is:
>
> def get_string(path):
> return _gnome.gnome_config_get_string(path)
>
>
> so it is just returning the results of the C call then? but what type?
>
>
>
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
>
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]