def  file_exists( pathname ):
result = <NUM_LIT:1><EOL>try:<EOL><INDENT>file = open( pathname, "<STR_LIT:r>" )<EOL>file.close()<EOL><DEDENT>except:<EOL><INDENT>result = None<EOL>sys.stderr.write( pathname + "<STR_LIT>" )<EOL><DEDENT>return result<EOL>
checks that a given file exists