Here is my workarounds
in lib\os.py:
def makedirs(path, mode='ignored'):
"""makedirs(path [, mode=0777])
Super-mkdir; create a leaf directory and all intermediate ones.
Works like mkdir, except that any intermediate path segment (not
just the rightmost) will be created if it does not exist.
The optional parameter is currently ignored.
"""
sys_path = sys.getPath(path)
if File(sys_path).mkdirs():
return
if(sys_path[-1]=='\\'):
if File(sys_path[:-2]).mkdirs():
return
# if making a /x/y/z/., java.io.File#mkdirs inexplicably fails. So
we need
# to force it
# need to use _path instead of path, because param is hiding
# os.path module in namespace!
head, tail = _path.split(sys_path)
if tail == curdir:
if File(_path.join(head)).mkdirs():
return
if(_path.join(head)[-1]=='\\'):
if File(_path.join(head)[:-2]).mkdirs():
return
raise OSError(0, "couldn't make directories", path)