A cross-platform python discovery tool to help locate python on any system.
Project description
Installation
Install from PyPI:
$ pipenv install --pre pythonfinder
Install from Github:
$ pipenv install -e git+https://github.com/techalchemy/pythonfinder.git#egg=pythonfinder
Usage
Using PythonFinder is easy. Simply import it and ask for a python:
>>> from pythonfinder.pythonfinder import PythonFinder >>> PythonFinder.from_line('python3') '/home/techalchemy/.pyenv/versions/3.6.5/python3' >>> PythonFinder.from_version('2.7') '/home/techalchemy/.pyenv/versions/2.7.14/python'
PythonFinder can even find beta releases!
>>> PythonFinder.from_version('3.7') '/home/techalchemy/.pyenv/versions/3.7.0b1/bin/python'
Windows Support
PythonFinder natively supports windows via both the PATH environment variable and PEP-514 compliant finder which comes by default with python 3. Usage on windows becomes:
>>> PythonFinder.from_line('python') WindowsPath('C:/Program Files/Python36/python.exe') >>> PythonFinder.from_version('2.7') WindowsPath('C:/Python27/python.exe') >>> PythonFinder.from_version('3.6') WindowsPath('C:/Program Files/Python36/python.exe') >>> PythonFinder.from_line('py -3') WindowsPath('C:/Program Files/Python36/python.exe')
Integrations
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pythonfinder-0.0.2.dev0.tar.gz
(10.1 kB
view hashes)
Built Distribution
Close
Hashes for pythonfinder-0.0.2.dev0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ba2a658c4c4259ddd5c4d509a14b7ca301ff36a651beb711bd2611472dfe020 |
|
MD5 | a5531e3ea1f5f05c99220b3ccdabbc64 |
|
BLAKE2b-256 | 179cd99e344c7e01068a89ba9a6f0172e76e95d7fff4039e32f471443ac8433c |