changeset 1740 | b789b695b5c6 |
parent 1736 | 7e61baa047f0 |
child 1742 | 92932cd370a4 |
1739:ec153828ded2 | 1740:b789b695b5c6 |
---|---|
44 |
44 |
45 |
45 |
46 def GetClassImporter(classpath): |
46 def GetClassImporter(classpath): |
47 if type(classpath)==str: |
47 if type(classpath)==str: |
48 def fac(): |
48 def fac(): |
49 mod=__import__(classpath.rsplit('.',1)[0]) |
49 mod=__import__(classpath.rsplit('.', 1)[0]) |
50 return reduce(getattr, classpath.split('.')[1:], mod) |
50 return reduce(getattr, classpath.split('.')[1:], mod) |
51 return fac |
51 return fac |
52 else: |
52 else: |
53 return classpath |
53 return classpath |
54 |
54 |