Giter Club home page Giter Club logo

see's Introduction

see

An alternative to Python's dir function. Easy to type; easy to read! For humans only.

Requirements: Python 2.4+ or 3.0

License: BSD (see the LICENSE file)

Contributions are welcome. See the CHANGELOG and AUTHORS files.

Install

To install see, run:

$ pip install --upgrade see

Alternatively, to install from source:

$ python setup.py install

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()
    divmod()      float()       hash()        help()        hex()
    int()         long()        oct()         repr()        str()
    .bit_length()               .conjugate()  .denominator  .imag
    .numerator    .real

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 a startup file, if one does not already exist:

    touch ~/.pythonrc.py
  2. Open the startup file in your preferred Python editor and 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.

Startup for iPython

For iPython users, importing see by default requires a little more work.

  1. Create a file named ipy_profile_see.py in your ~/.ipython directory, and add the following lines:

    from IPython import ipapi
    
    def main():
        ip = ipapi.get()
        ip.ex('from see import see')
    
    main()
  2. From here, you have two options:
    1. Launch iPython with the command: ipython -profile see
    2. Open ~/.ipython/ipy_user_conf.py and add the following line inside the main() function:

      import ipy_profile_see

see's People

Contributors

ljcooke avatar andreif avatar sjl avatar jdunck avatar

Watchers

James Cloos 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.