On Tue, Aug 4, 2009 at 8:30 PM, Yinon Ehrlich <span dir="ltr"><<a href="mailto:yinon.me@gmail.com">yinon.me@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
Easy way to test for Python version:<br>
if sys.hexversion >= 0x2060100:<br>
  pass<br>
<font color="#888888"></font></blockquote><div><br>Great suggestion. I just tested it on my newly installed Python 3.1 (as of 3.1r31)<br><br>>>> import sys<br>>>> "%X" % sys.hexversion<br>'30100F0'<br>
<br>That's genius - '301' for Python 3.1, and '00F0' is r31!<br><br>I'm definitely going to use this more often in the future.<br><br>Cheers,<br>Xavier<br></div></div>