PyGObject and DBusGConnection



Hi,

Very happy to see that NetworkManager is installing gir files! Will be
of great use for sugar.

However, I'm having trouble getting it going.

>>> from gi.repository import NMClient
>>> import dbus
>>> rs = NMClient.RemoteSettings(bus=dbus.SystemBus())
TypeError: could not convert value for property `bus' from SystemBus
to DBusGConnection

ok, that was not too surprising, given that dbus module is static bindings.

so, I try:
>>> from gi.repository import DBusGLib
>>> from gi.repository import DBus
and I simply can't see how to get anything useful (such as a
DBusGConnection of the system bus) out of those modules.

What am I missing?




On a related note, who's bug is this? NetworkManager.80211ApFlags
cannot be accessed:
>>> from gi.repository import NetworkManager
>>> '80211ApFlags' in dir(NetworkManager)
True
>>> NetworkManager.80211ApFlags
  File "<stdin>", line 1
    NetworkManager.80211ApFlags
                       ^
SyntaxError: invalid syntax

>>> getattr(NetworkManager, "80211ApFlags")

/usr/lib/python2.7/site-packages/gi/module.py:113: Warning: type name
`80211ApFlags' contains invalid characters
** (process:2252): CRITICAL **: pyg_flags_add: assertion `typename !=
NULL' failed
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/gi/module.py", line 270, in __getattr__
    return getattr(self._introspection_module, name)
  File "/usr/lib/python2.7/site-packages/gi/module.py", line 113, in __getattr__
    wrapper = flags_register_new_gtype_and_add(info)
SystemError: error return without exception set


Thanks,
Daniel


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]