geowatch.utils.util_chmod module

This logic was ported to ub.Path.chmod in 1.3.5, can remove and depend on that when it is ready.

geowatch.utils.util_chmod.new_chmod(path, code)[source]

dpath = ub.Path.appdir(‘util/chmod/test’).ensuredir() path = (dpath / ‘file’).touch() code = ‘g+x,g+r’ new_chmod(path, code) import stat stat.filemode(path.stat().st_mode)