Ejemplo n.º 1
0
 def to_disk(self):
     if not path.exists(path.dirname(self.filepath)):
         makedirs(path.dirname(self.filepath))
     with fopen(self.filepath, 'w') as fd:
         fd.write(self.to_json())
Ejemplo n.º 2
0
def ensure_directory_exists(dirpath):
    if not path.exists(dirpath):
        makedirs(dirpath)
Ejemplo n.º 3
0
def ensure_directory_exists(dirpath):
    if not path.exists(dirpath):
        makedirs(dirpath)
Ejemplo n.º 4
0
 def to_disk(self):
     if not path.exists(path.dirname(self.filepath)):
         makedirs(path.dirname(self.filepath))
     with fopen(self.filepath, 'w') as fd:
         fd.write(self.to_json())