Пример #1
0
 def create_importlet(self, path, script):
     path = codepath(path)
     if not path.startswith('/'):
         path = '/'.join([self.code_group.name, path])
     ds = self.store_python_code(path, script)
     stamp(ds, "importlet", {})
     return Importlet(self, ds)
Пример #2
0
 def create_importlet(self, path, script):
     path = codepath(path)
     if not path.startswith('/'):
         path = '/'.join([self.code_group.name, path])
     ds = self.store_python_code(path, script)
     stamp(ds, "importlet", {})
     return Importlet(self, ds)
Пример #3
0
 def __getitem__(self, path_or_ref):
     if isstring(path_or_ref):
         path = codepath(path_or_ref)
     else:
         path = self._node[path_or_ref].name
         assert path.startswith('/code')
     node = self._node[path]
     if isinstance(node, h5py.Group):
         return CodeGroup(self._paper, node)
     else:
         return CodeFile(self._paper, node)
Пример #4
0
 def get_local_module(self, name):
     path = codepath('/'.join(['', 'python-packages'] + name.split('.')))
     return APNode(self.code_group).get(path, None)
Пример #5
0
 def add_module(self, name, module_code):
     path = codepath('/'.join(['', 'python-packages'] + name.split('.')))
     ds = self.store_python_code(path, module_code)
     stamp(ds, "module", {})
Пример #6
0
 def get_local_module(self, name):
     path = codepath('/'.join(['', 'python-packages'] + name.split('.')))
     return APNode(self.code_group).get(path, None)
Пример #7
0
 def add_module(self, name, module_code):
     path = codepath('/'.join(['', 'python-packages'] + name.split('.')))
     ds = self.store_python_code(path, module_code)
     stamp(ds, "module", {})