def internet_on():
try:<EOL><INDENT>requests.get('<STR_LIT>')<EOL>return True<EOL><DEDENT>except requests.exceptions.RequestException:<EOL><INDENT>return False<EOL><DEDENT>
Pings Google to see if the internet is on. If online, returns true. If offline, returns false.