def remote_file_exists(file_url):
 try:
  handler = urllib2.urlopen(file_url)
  handler.close()
  return True
 except urllib2.HTTPError:
  return False

def remote_file_exists ( file_url ) : try : handler = urllib2 . urlopen ( file_url ) handler . close ( ) return True except urllib2 . HTTPError : return False
return true if the remote file exists .