def ensure_bytecode_path(bytecode_path):
 try:
  os.mkdir(os.path.dirname(bytecode_path))
 except OSError as error:
  if (error.errno != errno.EEXIST):
   raise

def ensure_bytecode_path ( bytecode_path ) : try : os . mkdir ( os . path . dirname ( bytecode_path ) ) except OSError as error : if ( error . errno != errno . EEXIST ) : raise
ensure that the __pycache__ directory for pep 3147 pyc file exists .