def try_rm(filename):
 try:
  os.remove(filename)
 except OSError as ose:
  if (ose.errno != errno.ENOENT):
   raise

def try_rm ( filename ) : try : os . remove ( filename ) except OSError as ose : if ( ose . errno != errno . ENOENT ) : raise
remove a file if it exists .