Created
March 10, 2011 20:58
-
-
Save indeyets/864921 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gi.repository import Midgard | |
class RdfMapper: | |
def __init__(self, mgd): | |
self.mgd = mgd | |
self.read_types() | |
def read_types(self): | |
for gtype in Midgard.Object.__gtype__.children: | |
self.read_type(gtype) | |
for gtype in Midgard.View.__gtype__.children: | |
self.read_type(gtype) | |
def read_type(self, gtype): | |
#help(gtype) | |
obj = Midgard.Object.factory(self.mgd, gtype.name, None) | |
help(obj.__class__) | |
rp = Midgard.ReflectionProperty.new(obj.__class__) | |
print(rp) | |
for kid in gtype.children: | |
self.read_type(kid) |
Author
indeyets
commented
Mar 10, 2011
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment