I commonly use os.path.exists() to check if a file is there before doing anything with it.
os.path.exists()
I\'ve run across a situation where I\'m calling a executable that
On Unix you have to split the PATH var.
if any([os.path.exists(os.path.join(p,progname)) for p in os.environ["PATH"].split(":")]): do_something()