[IPython-dev] Ascii imshow

Brian Granger ellisonbg at gmail.com
Thu Feb 10 15:21:07 EST 2011


Two quick comments:

* While I think this is incredibly cool, I am not sure this belongs in
IPython.  Two reasons for this: i) it is useful for people outside of
IPython and ii) plotting/viz is outside the scope of IPython.  I think
a much better place for this would be a standalone module or
matplotlib (imagine a terminal based backend!).
* If it does go into IPython, the proper directory would be lib, not
extensions.  IPython/extensions is for IPython extensions that adhere
to the official IPython extension API.

Cheers,

Brian

On Thu, Feb 10, 2011 at 11:53 AM, Fernando Perez <fperez.net at gmail.com> wrote:
> On Tue, Feb 1, 2011 at 9:56 AM, Nicolas Rougier
> <Nicolas.rougier at inria.fr> wrote:
>> I've made some time ago a kind of 'ascii imshow' function to render a numpy
>> array directly within the console by exploiting the 256 colors capability of
>> most modern terminal. I don't know how much interesting it can be for
>> IPython but I found the code useful for myself.
>> Code is located
>> at: http://www.loria.fr/~rougier/coding/software/numpy_imshow.py
>> (GPL license can be replaced by the BSD one if necessary)
>
> Want. Now. Fabulous!!
>
> If you'd be so kind as to officialy relicense it as BSD, we'd be
> thrilled to have it in IPython right away.  For the curious, this is
> what Nicolas' default example produces:
>
> http://imgur.com/iZ13v
>
> Note, this is a true terminal-only tool, it doesn't work correctly in
> the Qt console nor in a bare Linux console (i.e.  outside X11).  Both
> the Qt and Linux console show spurious codes and just two lines of
> weird colors.  It would be cool to see if this can be adapted to
> non-xterm environments later, but for now this is great as it is.
>
> Nicolas, if you're willing to submit this as a pull request against
> our trunk, by adding the code as a new module named
> IPython/extensions/ascii_imshow.py, it would be fantastic.  If you're
> not famliar with the github workflow let us know and we'll be happy to
> provide some pointers.
>
> If you can't spare the time to make a git-based pull request please
> let us know, it's possible someone else can collaborate with you to
> finish that part of the process.
>
> This file:
>
> https://github.com/ipython/ipython/blob/master/docs/source/development/template.py
>
> can serve as a template for putting your code in our standard format.
> Certainly do keep your original copyright statement in addition to
> (moving forward) the team one, and also add to the docstring an
> authorship line
>
> Authors
> --------
> * Nicolas Rougier...
>
> But it's good to have all source files similarly structured and
> documented project-wide.
>
> In any case, great little tool, I hope we can pull it in soon!
>
> Regards,
>
> f
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>



-- 
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu
ellisonbg at gmail.com



More information about the IPython-dev mailing list