Exemple #1
0
 def open(self, filename: str) -> None:
     import gzip
     if filename.endswith(".index"):
         filename = filename[:-6]
     self._filename = filename
     self._dictdb = DictDB(filename, "read", 1)
Exemple #2
0
 def open(self, filename: str):
     filename_nox, ext = splitext(filename)
     if ext.lower() == ".index":
         filename = filename_nox
     self._dictdb = DictDB(filename, "write", 1)
     self._filename = filename