skip to navigation
skip to content

Not Logged In

pycompat 0.1.0

Library to check Python and System version in a easy way

Latest Version: 0.2.1

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
 
File Type Py Version Uploaded on Size
pycompat-0.1.0.tar.gz (md5) Source 2014-07-04 4KB
  • Downloads (All Versions):
  • 23 downloads in the last day
  • 111 downloads in the last week
  • 462 downloads in the last month
  • Author: Alexandre Vicenzi
  • Maintainer: Alexandre Vicenzi
  • Home Page: https://github.com/alexandrevicenzi/pycompat
  • Bug Tracker: https://github.com/alexandrevicenzi/pycompat/issues
  • Download URL: https://github.com/alexandrevicenzi/pycompat/releases/download/v0.1.0/pycompat.zip
  • Keywords: python, system, sys, info, compatibility, py2to3
  • License:
    The MIT License (MIT)
    
    Copyright (c) 2014 Alexandre Vicenzi
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    
    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.
    
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
  • Categories
  • Package Index Owner: Alexandre.Vicenzi
  • DOAP record: pycompat-0.1.0.xml