def _check_version():
import urllib2<EOL>from distutils.version import LooseVersion<EOL>header ="<STR_LIT>"+"<STR_LIT>".format(ip.__version__)+"<STR_LIT>"+"<STR_LIT>"<EOL>try:<EOL><INDENT>htmldat = urllib2.urlopen("<STR_LIT>").readlines()<EOL>curversion = next((x for x in htmldat if "<STR_LIT>" in x), None).split("<STR_LIT:>>")[<NUM_LIT:1>].split("<STR_LIT:<>")[<NUM_LIT:0>]<EOL>if LooseVersion(ip.__version__) < LooseVersion(curversion):<EOL><INDENT>msg = """<STR_LIT>""".format(curversion)<EOL>print(header + "<STR_LIT:\n>" + msg)<EOL><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>except Exception as inst:<EOL><INDENT>pass<EOL><DEDENT>
Test if there's a newer version and nag the user to upgrade.