Everthought about using functions?
def createdir(d): original_umask_p = os.umask(0) os.makedirs(d, mode=0777) os.umask(original_umask_p)But you can set the umask() for the whole app on startup. And no need to restore it since it is set only for the process.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Your one-stop place for all your GIMP needs: gimp-forum.net