跳转到主要内容

与Python版本协同工作

项目描述

Dephell Pythons

travis appveyor MIT License

与Python版本协同工作。

安装

PyPI安装

python3 -m pip install --user dephell_pythons

用法

from dephell_pythons import Pythons

pythons = Pythons()

# get current:
python = pythons.get_best()

# properties:
python.name     # 'python3.7'
python.path     # Path('/usr/local/bin/python3.7')
python.version  # <Version('3.7.0')>

python.lib_paths
# [Path('/usr/local/lib/python37.zip'), Path('/usr/local/lib/python3.7'), ...]

python.lib_path
# Path('/home/gram/.local/lib/python3.7/site-packages')

# get by version
pythons.get_best('3.5').version
# <Version('3.5.2')>

# get by name
pythons.get_best('python3').version
# <Version('3.6.7')>

# get by specifier
pythons.get_best('<3.7').version
# <Version('3.6.7')>

# get by path
pythons.get_best('/usr/bin/python3.6').version
# <Version('3.6.7')>

# get all
list(pythons)
# [Python(...), Python(...), ...]

# work not only with installed pythons:
Pythons(abstract=True).get_best('>=2.8,<3.5').version
# <Version('3.4')>

项目详情


下载文件

为您的平台下载文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

dephell_pythons-0.1.15.tar.gz (11.5 kB 查看哈希值)

上传时间:

构建分布

dephell_pythons-0.1.15-py3-none-any.whl (14.2 kB 查看哈希值)

上传时间: Python 3

由...