def checkPath(filename, reporter=None):
 if (reporter is None):
  reporter = modReporter._makeDefaultReporter()
 try:
  if (sys.version_info < (2, 7)):
   mode = 'rU'
  else:
   mode = 'rb'
  with open(filename, mode) as f:
   codestr = f.read()
  if (sys.version_info < (2, 7)):
   codestr += '\n'
 except UnicodeError:
  reporter.unexpectedError(filename, 'problem decoding source')
  return 1
 except IOError:
  msg = sys.exc_info()[1]
  reporter.unexpectedError(filename, msg.args[1])
  return 1
 return check(codestr, filename, reporter)

def checkPath ( filename , reporter = None ) : if ( reporter is None ) : reporter = modReporter . _makeDefaultReporter ( ) try : if ( sys . version_info < ( 2 , 7 ) ) : mode = 'rU' else : mode = 'rb' with open ( filename , mode ) as f : codestr = f . read ( ) if ( sys . version_info < ( 2 , 7 ) ) : codestr += '\n' except UnicodeError : reporter . unexpectedError ( filename , 'problem decoding source' ) return 1 except IOError : msg = sys . exc_info ( ) [ 1 ] reporter . unexpectedError ( filename , msg . args [ 1 ] ) return 1 return check ( codestr , filename , reporter )
check the given path .