[IPython-dev] Getting the size of ipython notebook cell

Thomas Kluyver takowl at gmail.com
Mon Jul 7 15:35:27 EDT 2014

On 7 July 2014 14:27, bjonen <bjonen at gmail.com> wrote:

> I am working on a patch for pandas that allows a dataframe's string
> representation to scale with the height and width of the terminal.
> It would be nice to make this possible in the ipython notebook also.
> However, for this I would need a way to infer the current size of a cell in
> the notebook to cut the dataframe appropriately.
> Anybody know a way to do this?

There's certainly no practical way to do this at the moment, and I don't
think we should add one. For instance, what if the user resizes their
browser after displaying it? What if they share the notebook with people
whose screens are bigger or smaller? I don't think trying to tailor the
output to the screen size like that makes sense.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140707/e44579d7/attachment.html>

More information about the IPython-dev mailing list