[pygobject] Add __path__ attributes.
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Add __path__ attributes.
- Date: Wed, 13 Oct 2010 17:34:54 +0000 (UTC)
commit 03d2e2924e27a9d6cae89e5748f70e0a51be91c6
Author: Damien Caliste <damien caliste cea fr>
Date: Tue Sep 28 12:44:42 2010 +0200
Add __path__ attributes.
Add an attribute __path__ to DynamicModule and IntrospectionModule,
using the path of the typelib.
https://bugzilla.gnome.org/show_bug.cgi?id=630807
gi/module.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gi/module.py b/gi/module.py
index 819fcc6..d1aadc2 100644
--- a/gi/module.py
+++ b/gi/module.py
@@ -85,6 +85,7 @@ class IntrospectionModule(object):
self.__name__ = 'gi.repository.' + namespace
repository.require(self._namespace, self.version)
+ self.__path__ = repository.get_typelib_path(self._namespace)
if self.version is None:
self.version = repository.get_version(self._namespace)
@@ -222,6 +223,7 @@ class DynamicModule(object):
overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
self._overrides_module = getattr(overrides_modules, self._namespace, None)
+ self.__path__ = repository.get_typelib_path(self._namespace)
def __getattr__(self, name):
if self.introspection_module is None:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]