mirror of
https://github.com/graphdeco-inria/gaussian-splatting
synced 2024-11-22 08:18:17 +00:00
18 lines
499 B
Python
18 lines
499 B
Python
from errno import EEXIST
|
|
from os import makedirs, path
|
|
import os
|
|
|
|
def mkdir_p(folder_path):
|
|
# Creates a directory. equivalent to using mkdir -p on the command line
|
|
try:
|
|
makedirs(folder_path)
|
|
except OSError as exc: # Python >2.5
|
|
if exc.errno == EEXIST and path.isdir(folder_path):
|
|
pass
|
|
else:
|
|
raise
|
|
|
|
def searchForMaxIteration(folder):
|
|
saved_iters = [int(fname.split("_")[-1]) for fname in os.listdir(folder)]
|
|
return max(saved_iters)
|