项目作者: neutrinoceros

项目描述 :
A command line tool to query source code from your current Python env
高级语言: Python
项目地址: git://github.com/neutrinoceros/wxc.git
创建时间: 2020-05-23T20:34:14Z
项目社区:https://github.com/neutrinoceros/wxc

开源协议:GNU General Public License v3.0

下载


wxc

PyPI

pre-commit.ci status
Ruff

wxc (pronounced “which”) allows you to inspect source code in your Python
environment from the command line. It is based on the inspect module from the
standard library.

Installation

  1. $ python -m pip install wxc

Usage

Get the version number of a package in your current environment



Locate the file from which a Python package is imported



Locate a specific method’s source code



View the source code of function directly from the terminal stdout



wxc tries to be helpful when you mistype



For more, run

  1. $ wxc --help

Known limitations

wxc is not currently able to retrieve the source of compiled code binded into
Python. It should however correctly point to the compiled file that an object is
imported from.

wxc should never be installed in isolation (for instance via
pipx) since it would completely defeat
its purpose.

Notes

  • wxc is fully tested on macOS, Linux, and partially on Windows
  • this project was formerly named “whych” and renamed to avoid confusion with the
    pypi-available package of the same name.