code: def safeMakeDirs(path, mode=0o777):
          
          try:
              os.makedirs(path, mode)
  
              return True
          except OSError:
              return False
docs: Creates the given directory path, as well as intermediate directories.
          Catches any I/O exception, returning False in that case; otherwise,
          True is returned.