def checkPath(filename):
try:<EOL><INDENT>return check(file(filename, '<STR_LIT>').read() + '<STR_LIT:\n>', filename)<EOL><DEDENT>except IOError as msg:<EOL><INDENT>sys.stderr.write("<STR_LIT>" % (filename, msg.args[<NUM_LIT:1>]))<EOL>return <NUM_LIT:1><EOL><DEDENT>
Check the given path, printing out any warnings detected.

@return: the number of warnings printed