Use Python 3 shutil.which on Python 2::
try:
from shutil import which
except ImportError:
from backports.shutil_which import which
Raw data
{
"_id": null,
"home_page": "https://github.com/minrk/backports.shutil_which",
"name": "backports.shutil_which",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Min RK",
"author_email": "benjaminrk@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a0/22/51b896a4539f1bff6a7ab8514eb031b9f43f12bff23f75a4c3f4e9a666e5/backports.shutil_which-3.5.2.tar.gz",
"platform": "",
"description": "\nUse Python 3 shutil.which on Python 2::\n\n try:\n from shutil import which\n except ImportError:\n from backports.shutil_which import which\n\n\n",
"bugtrack_url": null,
"license": "Python Software Foundation License",
"summary": "Backport of shutil.which from Python 3.3",
"version": "3.5.2",
"project_urls": {
"Homepage": "https://github.com/minrk/backports.shutil_which"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3d1b136e8ffa98ce077e12afde6c333eb2b61266e0de0e404ec7a0c47b8f8a8b",
"md5": "c97381f5bd8333c51d880589562b1f5c",
"sha256": "dc627fb2bc40f8ad7e012d7d9a59ed0cb1b74a9510ed936b3f9358b7ac6d4d31"
},
"downloads": -1,
"filename": "backports.shutil_which-3.5.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "c97381f5bd8333c51d880589562b1f5c",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 2676,
"upload_time": "2018-11-15T10:32:22",
"upload_time_iso_8601": "2018-11-15T10:32:22.244068Z",
"url": "https://files.pythonhosted.org/packages/3d/1b/136e8ffa98ce077e12afde6c333eb2b61266e0de0e404ec7a0c47b8f8a8b/backports.shutil_which-3.5.2-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a02251b896a4539f1bff6a7ab8514eb031b9f43f12bff23f75a4c3f4e9a666e5",
"md5": "739bd7d6d03fc36ffd656e5d9c7507a5",
"sha256": "fe39f567cbe4fad89e8ac4dbeb23f87ef80f7fe8e829669d0221ecdb0437c133"
},
"downloads": -1,
"filename": "backports.shutil_which-3.5.2.tar.gz",
"has_sig": false,
"md5_digest": "739bd7d6d03fc36ffd656e5d9c7507a5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3190,
"upload_time": "2018-11-15T10:32:23",
"upload_time_iso_8601": "2018-11-15T10:32:23.495132Z",
"url": "https://files.pythonhosted.org/packages/a0/22/51b896a4539f1bff6a7ab8514eb031b9f43f12bff23f75a4c3f4e9a666e5/backports.shutil_which-3.5.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2018-11-15 10:32:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "minrk",
"github_project": "backports.shutil_which",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"lcname": "backports.shutil_which"
}