Ejemplo n.º 1
0
Archivo: native.py Proyecto: kcsaff/CA
def read(filename, file=None):
    import formats
    result = qdict.qdict()
    z = zipfile.ZipFile(file or filename, 'r')
    resources = z.namelist()
    for resource in resources:
        result.update(formats.read(resource, z.open(resource) ))
    return result
Ejemplo n.º 2
0
  def read(self):
    self.text = formats.read(self.basepath)

    for (filename, path) in formats.iter(self.basepath):
      child = LocalDocument(self.repo, os.path.split(filename)[1], None,
                            self.ancestors + [weakref.ref(self)])
      child.basepath = path
      child.unlink = True
      self.children.append(child)
Ejemplo n.º 3
0
Archivo: window.py Proyecto: kcsaff/CA
 def file_open(self, filename):
     self.resources.update(formats.read(filename), True)
     formats.unwrap(self.world, self.view, self.resources)
     self.last_filename = filename