To check if a file exists,
from sys import argvfrom os.path import existsscript, filename = argvtarget = open(filename)print "file exists: %r" % exists(filename)
To check if a file exists,
from sys import argvfrom os.path import existsscript, filename = argvtarget = open(filename)print "file exists: %r" % exists(filename)