GithubHelp home page GithubHelp logo

helphelp's Introduction

Command-line help on Python modules, classes and functions

This package procures the command-line tool pyh. It works somewhat like UNIX's man, but for Python's docstring-based help system. In a nutshell:

$ pyh print
print(...)
    print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)

    Prints the values to a stream, or to sys.stdout by default.
    Optional keyword arguments:
    file:  a file-like object (stream); defaults to the current sys.stdout.
    sep:   string inserted between values, default a space.
    end:   string appended after the last value, default a newline.
    flush: whether to forcibly flush the stream.

A more complex example:

$ pyh pathlib Path.is_file
Help on function is_file in module pathlib:

is_file(self)
    Whether this path is a regular file (also True for symlinks pointing
    to regular files).

To shorten the command lines a bit, one can configure a set of their favorite aliases for modules names in file $XDG_CONFIG_HOME/pyh/aliases (which typically resolves to $HOME/.config/pyh/aliases). The alias file is written in the NestedText format, which looks similar to YAML. One simply encodes an alias-to-module name dictionary, one line per entry. Example:

pd: pandas
pl: pathlib
ap: argparse

Installing

pip install pyh

Development

Setting up the development environment relies on Conda. Clone the repository, cd into the local copy, then

$ conda env create

Dependent packages are managed through the environment.yml file. When changing dependencies, update the development environment with command

$ conda env update

helphelp's People

Contributors

hamelin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.