def safe_mkdir(directory, clean=False):
  if clean:
    safe_rmtree(directory)
  try:
    os.makedirs(directory)
  except OSError as e:
    if e.errno != errno.EEXIST:
      raise
Emits the log record's message to the splash screen.
dataset/ETHPy150Open pantsbuild/pex/pex/common.py/safe_mkdir--crossover with--dataset/ETHPy150Open enthought/pyface/pyface/splash_screen_log_handler.py/SplashScreenLogHandler.emit