[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-dbus
Subject: Re: parameter matching in python (client side)
From: Simon McVittie <simon.mcvittie () collabora ! co ! uk>
Date: 2007-10-18 14:14:37
Message-ID: 20071018141437.GA30682 () carbon ! pseudorandom ! co ! uk
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, 18 Oct 2007 at 15:23:52 +0200, Vincent GĂ©nieux wrote:
> I would like to make name my parameters when calling the remote
> function, I a trying to do this:
> remote.func3(param1="myStr1", param2=2, param3="myStr3")
You can't. D-Bus only supports positional parameters.
If you want a "named parameters" style on D-Bus, you'd have to use a dict.
Specifications often use "a{sv}" or "a{ss}" for extensible named
parameters - for instance, freedesktop.org notifications
(http://www.galago-project.org/specs/notification/0.9/x408.html#command-notify)
use an a{sv} for the "hints" parameter.
D-Bus also doesn't support optional parameters, so naming the parameters
in Python isn't very useful.
Simon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: OpenPGP key: http://www.pseudorandom.co.uk/2003/contact/ or pgp.net
iD8DBQFHF2pNWSc8zVUw7HYRAim/AKC9yFKDQFwMgDmuWwXmzOJeV1qCGwCfX8Ws
f5g3YLIcQlrl7ztjqsIVJ+k=
=0wmI
-----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