Argument types in python

Janosch Peters jp at binford3000.de
Sat Nov 10 03:21:48 PST 2007


Hi List,

I'm new to dbus as well as to python, so this is probably a very dumb 
question. I'm trying to write a small python programm which should 
establish a VPN connection via Network-Manager. I'm stuck at the very 
beginning because I cannot even call a method. I try to call the method 
ListConnections, which is defined in the introspection files of NM:

<method name="ListConnections">
      <annotation name="org.freedesktop.DBus.GLib.CSymbol" 
value="impl_vpn_manager_get_connections"/>
      <arg name="connections" type="ao" direction="out"/>
</method>

the relevant part of my code looks like this:

sig=dbus.Signature('o')
cons = dbus.Array( sig )                 #isn't 'cons' of type="ao"?
interface.ListConnections( cons )


Python tells my that "Method 'ListConnections' with signature 'ag' (...) 
doesent exist". Which is, of course, correct. But I thought the 
type="ao" thingy means that the method returns an array of object paths. 
Thats why I constructed the latter. But it seems to me that I didn't 
realy construct an "ao". How do I do that?


cheers,
Janosch



More information about the dbus mailing list