[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-dbus
Subject: Re: python D-Bus: get_type() -> contant names?
From: Simon McVittie <simon.mcvittie () collabora ! co ! uk>
Date: 2008-03-14 12:58:26
Message-ID: 20080314125826.GB4503 () carbon ! pseudorandom ! co ! uk
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, 14 Mar 2008 at 11:48:08 +0000, Alban Crequy wrote:
> What is the name of contants in python for
> DBUS_MESSAGE_TYPE_{METHOD_{CALL,RETURN},ERROR,SIGNAL}? I want to avoid
> using "if msg.get_type() == 4".
You can use "if isinstance(msg, SignalMessage)" etc. instead. Import the
classes from the dbus.lowlevel module.
I would accept patches that added these constants to dbus.lowlevel too
(please file a bug on bugs.freedesktop.org).
Simon
-----BEGIN PGP SIGNATURE-----
iD8DBQFH2nZxWSc8zVUw7HYRAoB8AJ0Y03pRLhFjtWO+sQK+DesG9TTHkwCeKbrF
SDEYoEUkGdAW1oLNXSPXab0=
=nmgo
-----END PGP SIGNATURE-----
_______________________________________________
dbus mailing list
dbus@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dbus
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic