def compare_versions(a, b):
if a:<EOL><INDENT>a = distutils.version.LooseVersion(a)<EOL>b = distutils.version.LooseVersion(b)<EOL>if a>=b: return True<EOL>else: return False<EOL><DEDENT>else: return False<EOL>
return True if a is greater than or equal to b