How check whether a file exists without exceptions?

Use os.path.exists to check both files and directories:

import os.path
os.path.exists(file_path)

Use os.path.isfile to check only files

import os.path
os.path.isfile(file_path)