from errno import EEXIST
from os.path import split
from os import makedirs
def bfs11364(path):
  bfs11363 = []
  while True:
    (path, bfs11365) = split(path)
    if (bfs11365 != ''):
      bfs11363.append(bfs11365)
    else:
      if (path != ''):
        bfs11363.append(path)

      break


  return list(reversed(bfs11363))

def bfs11366(path):
  try:
    makedirs(path)
  except OSError, exception:
    if (exception.errno != EEXIST):
      raise 



