def deduce_helpful_msg(req):
 msg = ''
 if os.path.exists(req):
  msg = ' It does exist.'
  try:
   with open(req, 'r') as fp:
    parse_requirements(fp.read()).next()
    msg += ((((' The argument you provided ' + ('(%s) appears to be a' % req)) + ' requirements file. If that is the') + " case, use the '-r' flag to install") + ' the packages specified within it.')
  except RequirementParseError:
   logger.debug(("Cannot parse '%s' as requirements             file" % req), exc_info=1)
 else:
  msg += (" File '%s' does not exist." % req)
 return msg

def deduce_helpful_msg ( req ) : msg = '' if os . path . exists ( req ) : msg = ' It does exist.' try : with open ( req , 'r' ) as fp : parse_requirements ( fp . read ( ) ) . next ( ) msg += ( ( ( ( ' The argument you provided ' + ( '(%s) appears to be a' % req ) ) + ' requirements file. If that is the' ) + " case, use the '-r' flag to install" ) + ' the packages specified within it.' ) except RequirementParseError : logger . debug ( ( "Cannot parse '%s' as requirements             file" % req ) , exc_info = 1 ) else : msg += ( " File '%s' does not exist." % req ) return msg
returns helpful msg in case requirements file does not exist .