Skip to main content

dir for humans

Project description

https://img.shields.io/pypi/v/see.svg https://travis-ci.org/araile/see.svg?branch=develop https://coveralls.io/repos/github/araile/see/badge.svg?branch=develop

see is an alternative to the built-in dir function in Python. It shows you what you can do with things.

Supports Python 2.6+ and 3.2+. Also works in iPython and PyPy.

License

BSD (see the LICENSE file)

Contributions are welcome. See the CHANGELOG.rst and AUTHORS.rst files.

Install

To install see, run:

$ pip install --upgrade see

Usage

see is designed for the interactive Python interpreter. Import the see function like so:

>>> from see import see

Call see() without arguments to see all objects in the global scope.

>>> foo = 'bar'
>>> see()
    foo      see()

Call see(an_object) to see what you can do with an_object.

>>> number = 1
>>> see(number)
    +                -                *                /                //
    %                **               <<               >>               &
    ^                |                +obj             -obj             ~
    <                <=               ==               !=               >
    >=               abs()            bool()           dir()
    divmod()         float()          hash()           help()
    hex()            int()            oct()            repr()
    round()          str()            .bit_length()    .conjugate()
    .denominator     .from_bytes()    .imag            .numerator
    .real            .to_bytes()

Startup

You can use a Python startup file to ensure that see is available every time you run Python. The following example uses a startup file named .pythonrc.py in the user’s home directory:

  1. Create the Python startup file, if it does not already exist:

    $ touch ~/.pythonrc.py
  2. Open this file in your preferred editor. Add the following line:

    from see import see
  3. Set the following environment variable (e.g. in ~/.bashrc for Bash):

    $ export PYTHONSTARTUP="$HOME/.pythonrc.py"

Now you can use see immediately after running python, without having to manually import it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

see-1.3.2.zip (15.5 kB view hashes)

Uploaded Source

see-1.3.2.tar.gz (11.1 kB view hashes)

Uploaded Source

see-1.3.2.tar.bz2 (10.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page