예제 #1
0
파일: native.py 프로젝트: 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
예제 #2
0
파일: spider.py 프로젝트: jim-minter/esf
  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)
예제 #3
0
파일: window.py 프로젝트: 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