With the latest round of Dbusmenu fixes and libunity-3.4.2 I can actually do in python:
from gi.repository import Unity
dir(Unity)
But whenever I try and use any of the classes there I get some odd errors. Eg.
>>> appman = Unity.AppInfoManager.get_instance()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.7/gi/module.py", line 263, in __getattr__
return getattr(self._introspection_module, name)
File "/usr/lib/pymodules/python2.7/gi/module.py", line 160, in __getattr__
wrapper = metaclass(name, bases, dict_)
File "/usr/lib/pymodules/python2.7/gi/types.py", line 226, in __init__
set_object_has_new_constructor(cls.__info__.get_g_type())
TypeError: must be a subtype of GObject
or
>>> dir(Unity.LauncherEntry)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.7/gi/module.py", line 263, in __getattr__
return getattr(self._introspection_module, name)
File "/usr/lib/pymodules/python2.7/gi/module.py", line 136, in __getattr__
interfaces = tuple(interface for interface in get_interfaces_for_object(info)
File "/usr/lib/pymodules/python2.7/gi/module.py", line 76, in get_interfaces_for_object
interfaces.append(getattr(module, name))
File "/usr/lib/pymodules/python2.7/gi/module.py", line 263, in __getattr__
return getattr(self._introspection_module, name)
File "/usr/lib/pymodules/python2.7/gi/module.py", line 160, in __getattr__
wrapper = metaclass(name, bases, dict_)
File "/usr/lib/pymodules/python2.7/gi/types.py", line 228, in __init__
register_interface_info(cls.__info__.get_g_type())
TypeError: must be an interface
With the latest round of Dbusmenu fixes and libunity-3.4.2 I can actually do in python:
from gi.repository import Unity
dir(Unity)
But whenever I try and use any of the classes there I get some odd errors. Eg.
>>> appman = Unity.AppInfoMa nager.get_ instance( ) pymodules/ python2. 7/gi/module. py", line 263, in __getattr__ self._introspec tion_module, name) pymodules/ python2. 7/gi/module. py", line 160, in __getattr__ pymodules/ python2. 7/gi/types. py", line 226, in __init__ object_ has_new_ constructor( cls.__info_ _.get_g_ type())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
return getattr(
File "/usr/lib/
wrapper = metaclass(name, bases, dict_)
File "/usr/lib/
set_
TypeError: must be a subtype of GObject
or
>>> dir(Unity. LauncherEntry) pymodules/ python2. 7/gi/module. py", line 263, in __getattr__ self._introspec tion_module, name) pymodules/ python2. 7/gi/module. py", line 136, in __getattr__ for_object( info) pymodules/ python2. 7/gi/module. py", line 76, in get_interfaces_ for_object append( getattr( module, name)) pymodules/ python2. 7/gi/module. py", line 263, in __getattr__ self._introspec tion_module, name) pymodules/ python2. 7/gi/module. py", line 160, in __getattr__ pymodules/ python2. 7/gi/types. py", line 228, in __init__ interface_ info(cls. __info_ _.get_g_ type())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
return getattr(
File "/usr/lib/
interfaces = tuple(interface for interface in get_interfaces_
File "/usr/lib/
interfaces.
File "/usr/lib/
return getattr(
File "/usr/lib/
wrapper = metaclass(name, bases, dict_)
File "/usr/lib/
register_
TypeError: must be an interface
I will look into it