def symlink_ok():
 try:
  open(libcuda_convnet_so).close()
  return True
 except IOError:
  return False

def symlink_ok ( ) : try : open ( libcuda_convnet_so ) . close ( ) return True except IOError : return False
check if an existing library exists and can be read .