Pretty dir printing with joy
Project description
pdir2: Pretty dir() printing with joy🍺
======================================
|Build Status| |Supported Python versions|
Have you ever dreamed of a better output of ``dir()``? I do. So I
created this.
.. figure:: https://github.com/laike9m/pdir2/raw/master/images/presentation.gif
:alt:
Features
--------
- Attributes are grouped by types/functionalities, with beautiful
colors.
- Support all platforms including Windows(Thanks to
`colorama <https://github.com/tartley/colorama>`__).
- Support `ipython <https://github.com/ipython/ipython>`__,
`ptpython <https://github.com/jonathanslenders/ptpython>`__ and
`bpython <https://www.bpython-interpreter.org/>`__! See
`wiki <https://github.com/laike9m/pdir2/wiki#repl-support>`__ for
more information.
- The return value of ``pdir()`` can still be used as a list of names.
- You can search for certain names with ``.s()`` or ``.search()``:
.. figure:: https://github.com/laike9m/pdir2/raw/master/images/search.gif
:alt:
Search is case-insensitive by default. You can use
``.search(name, case_sensitive=True)`` to do case sensitive searching.
Install
-------
::
pip install pdir2
About the name. I wanted to call it "pdir", but there's already one with
this name on pypi. Mine is better, of course.
As a better alternative of ``dir()``, it's more convenient to
automatically import pdir2 when launching REPL. Luckily, Python provides
a way to do this.
In you ``.bashrc``\ (or ``.zshrc``), add this line:
::
export PYTHONSTARTUP=$HOME/.pythonstartup
Then, create ``.pythonstartup`` in your home folder. Add one line:
::
import pdir
Next time you launch REPL, ``pdir()`` is already there, Hooray!
Testing
-------
Simply run ``pytest``, or use ``tox`` if you like.
.. |Build Status| image:: https://travis-ci.org/laike9m/pdir2.svg
:target: https://travis-ci.org/laike9m/pdir2
.. |Supported Python versions| image:: https://img.shields.io/pypi/pyversions/pdir2.svg
:target: https://pypi.python.org/pypi/pdir2/
Release History
===============
0.1.0(2017-03-16)
-----------------
- Add support for ipython, ptpython and bpython (#4)
0.0.2(2017-03-11)
-----------------
API Changes (Backward-Compatible)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Added a ``case_sensitive`` parameter into the ``search`` function
(#5)
Bugfixes
~~~~~~~~
- Error calling pdir(pandas.DataFrame) (#1)
- Methods are now considered functions (#6)
======================================
|Build Status| |Supported Python versions|
Have you ever dreamed of a better output of ``dir()``? I do. So I
created this.
.. figure:: https://github.com/laike9m/pdir2/raw/master/images/presentation.gif
:alt:
Features
--------
- Attributes are grouped by types/functionalities, with beautiful
colors.
- Support all platforms including Windows(Thanks to
`colorama <https://github.com/tartley/colorama>`__).
- Support `ipython <https://github.com/ipython/ipython>`__,
`ptpython <https://github.com/jonathanslenders/ptpython>`__ and
`bpython <https://www.bpython-interpreter.org/>`__! See
`wiki <https://github.com/laike9m/pdir2/wiki#repl-support>`__ for
more information.
- The return value of ``pdir()`` can still be used as a list of names.
- You can search for certain names with ``.s()`` or ``.search()``:
.. figure:: https://github.com/laike9m/pdir2/raw/master/images/search.gif
:alt:
Search is case-insensitive by default. You can use
``.search(name, case_sensitive=True)`` to do case sensitive searching.
Install
-------
::
pip install pdir2
About the name. I wanted to call it "pdir", but there's already one with
this name on pypi. Mine is better, of course.
As a better alternative of ``dir()``, it's more convenient to
automatically import pdir2 when launching REPL. Luckily, Python provides
a way to do this.
In you ``.bashrc``\ (or ``.zshrc``), add this line:
::
export PYTHONSTARTUP=$HOME/.pythonstartup
Then, create ``.pythonstartup`` in your home folder. Add one line:
::
import pdir
Next time you launch REPL, ``pdir()`` is already there, Hooray!
Testing
-------
Simply run ``pytest``, or use ``tox`` if you like.
.. |Build Status| image:: https://travis-ci.org/laike9m/pdir2.svg
:target: https://travis-ci.org/laike9m/pdir2
.. |Supported Python versions| image:: https://img.shields.io/pypi/pyversions/pdir2.svg
:target: https://pypi.python.org/pypi/pdir2/
Release History
===============
0.1.0(2017-03-16)
-----------------
- Add support for ipython, ptpython and bpython (#4)
0.0.2(2017-03-11)
-----------------
API Changes (Backward-Compatible)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Added a ``case_sensitive`` parameter into the ``search`` function
(#5)
Bugfixes
~~~~~~~~
- Error calling pdir(pandas.DataFrame) (#1)
- Methods are now considered functions (#6)
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
pdir2-0.1.1.tar.gz
(7.0 kB
view hashes)
Built Distribution
Close
Hashes for pdir2-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59f0313a6cd34def9da18e4f8ea24532bd07c44a1daa48efd03030832fe83ff5 |
|
MD5 | 81faa0e1fb532561a44062377b0ef69e |
|
BLAKE2b-256 | 87c5e3f3f76d3812648acedfd2c5df184e0ef1d112f8ee0f546e9bae24ae0b17 |