A CLI facility to inspect Python environments.
Project description
wxc
wxc
(pronounced "which") is a command line tool to query the current Python environment, wrapping functionalities from the very useful but fragile builtin module inspect
.
In essence,
$ wxc pandas
is equivalent to
$ python -c "import pandas; print(pandas.__file__)"
wxc
can also be used to navigate source code, by locating classes and functions by file:line number
$ wxc pandas.DataFrame
/Users/yourname/miniconda3/envs/production/lib/python3.8/site-packages/pandas/core/frame.py:319
which is extremely conveninent when combined with augmented terminal applications such as iterm2
Installation
$ pip install wxc
Note that wxc
should never be installed in isolation (for instance via
pipx) since it would completely defeat
the purpose.
Usage
Examples
$ wxc numpy
/Users/yourname/miniconda3/envs/production/lib/python3.8/site-packages/numpy
$ wxc pandas --version
1.0.3
$ wxc stdlib_list --full
source = /Users/yourname/miniconda3/envs/production/lib/python3.9/site-packages/stdlib_list/__init__.py:0
version = v0.8.0
in_stdlib = False
name = stdlib_list
Notes
- the Python api is tested on macOS, Linux, for Python 3.6 and 3.9
wxc
relies on stdlib_list to determine which packages are part of the standard library.- this project was formerly named "whych" and renamed to avoid confusion with the pypi-available package of the same name.
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
wxc-6.0.1.tar.gz
(16.5 kB
view hashes)
Built Distribution
wxc-6.0.1-py3-none-any.whl
(16.8 kB
view hashes)