#NEWLINE# def compare_version( v1 , v2 ) : #NEWLINE# #INDENT# "Compare docker versions\n\n    >>> v1 = '1.9'\n    >>> v2 = '1.10'\n    >>> compare_version(v1, v2)\n    1\n    >>> compare_version(v2, v1)\n    -1\n    >>> compare_version(v2, v2)\n    0\n    " #NEWLINE# s1 = StrictVersion ( v1 ) #NEWLINE# s2 = StrictVersion ( v2 ) #NEWLINE# if ( s1 == s2 ) : #NEWLINE# #INDENT# return 0 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( s1 > s2 ) : #NEWLINE# #INDENT# return ( - 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return 1