Where is Gio.resources_register on Raspberry Pi?



Ok Guys,

I give up. I have been trying to access Gio.resources_register on a Raspberry Pi running the raspbian OS (Debian wheezy). This is what I get

pi pi2 ~ $ python

Python 2.7.3 (default, Mar 18 2014, 05:13:23)

[GCC 4.6.3] on linux2

Type "help", "copyright", "credits" or "license" for more information.

from gi.repository import Gio

print Gio.resources_register

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/usr/lib/python2.7/dist-packages/gi/module.py", line 316, in __getattr__

     return getattr(self._introspection_module, name)

File "/usr/lib/python2.7/dist-packages/gi/module.py", line 135, in __getattr__

     self.__name__, name))

AttributeError: 'gi.repository.Gio' object has no attribute 'resources_register'



Ok that is not how I plan to use the function in reality but it illustrates the point. The function is not there. This is what I expect to see.

roger dragon:~$ python

Python 2.7.9 (default, Apr  2 2015, 15:33:21)

[GCC 4.9.2] on linux2

Type "help", "copyright", "credits" or "license" for more information.

from gi.repository import Gio

print Gio.resources_register

gi.FunctionInfo(resources_register)



I can see the function in the typelib

      <method name="_register" c:identifier="g_resources_register">

        <return-value transfer-ownership="none">

          <type name="none"/>

        </return-value>

      </method>


I can see it in the associated shared object (libgio-2.0.so.0.4000.0).

pi pi2 /usr/lib/arm-linux-gnueabihf $ strings libgio* | grep resources_register

g_resources_register

g_resources_register_unlocked

g_resources_register

g_resources_register

g_resources_register

g_resources_register

pi pi2 /usr/lib/arm-linux-gnueabihf $



What am I missing?

Why is it not being dynamically imported from the typelib?

The only differences I can see are the versions of Python and GCC being used, and the version of the shared object which is 4400 on my Ubuntu system.

The only thing I can think of is that the register and unregister functions come from a later version of the api. But I cannot find any version dependant code on the pi.

All help gratefully received. This is driving me nuts.

Roger


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