Library to check Python and System version in a easy way
Project description
Library to check Python and System version in a easy way
Compatibility
Works with all major versions of Python.
Tested on Python 1.5, 2.2, 2.3, 2.4, 2.6, 2.7, 3.0, 3.2, 3.3, 3.4 and PyPy.
How to use?
from pycompat import python as py
py.is2xx
>>> True
py.is27x
>>> True
py.is3xx
>>> False
py.is_gt(2, 5)
>>> True
py.is_lt(3)
>>> True
py.is_eq(2, 7, 5)
>>> True
py.is_cpython
>>> True
py.is_pypy
>>> False
from pycompat import system as sys
sys.is_64bits
>>> True
sys.is_linux
>>> True
sys.is_linux2
>>> True
sys.is_linux3
>>> False
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pycompat-0.1.0.tar.gz
(4.9 kB
view hashes)