On Aug 4, 1:19 am, John Nagle <na...@animats.com> wrote: > This works, but it seems too cute: > > >>> pyver = map(int,sys.version.split()[0].split('.')) > >>> print(pyver) > [2, 6, 1] > > Is it guaranteed that the Python version string will be in a form > suitable for that? In other words, does "sys.version" begin > > N.N.N other stuff > > in all versions, and will it stay that way? Are there ever > non-numeric versions, like "3.2.rc1"? > > John Nagle
Hi, Easy way to test for Python version: if sys.hexversion >= 0x2060100: pass -- Yinon -- http://mail.python.org/mailman/listinfo/python-list