This package provides cross-platform cross-python shutil.which functionality.
Project description
That code in my care That sly command-line stare That strips my operating system bare It's whichcraft
This package provides cross-platform cross-python shutil.which functionality.
Usage
On Linux, Mac, Windows for Python 2.6, 2.7, or any of the 3s:
>>> from whichcraft import which
>>> which('date')
'/bin/date'
>>> which('calendar')
'/bin/calendar'
>>> which('cookiecutter')
'/Users/pydanny/.envs/fun/bin/cookiecutter'
>>> which('a-made-up-name') is None
True
Notes
This is a shim of the shutil.which function that’s designed to work across multiple versions of Python and inside of windows. The code for Python 2.x is based on Python 3 code that I extracted from source. I originally did this for Cookiecutter but pulled it out in order to reduce line count for that project.
History
0.2.0 (2015-04-??)
Python 3.5 compatability
Added lyrics
0.1.1 (2015-09-09)
Added lyrics
0.1.0 (2015-09-09)
First release on PyPI.
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
whichcraft-0.2.0.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for whichcraft-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d5c49c403ce69acd9f418ed6d389ccb2d08767343024b2662e0cf33a39adac6 |
|
MD5 | b208f9a983a12a8e2b34ba67a298b4bd |
|
BLAKE2b-256 | a3a70d0acff2f0c577d61272ecc0675b74b65e149ae51e4180239bfc0bb1241f |