[IPython-dev] notebook-like format for IPythonQt sessions.

Gerardo Gutierrez muzgash.lists at gmail.com
Sat Apr 17 20:02:01 EDT 2010


Ok i'm going to paste a fragment of a document about this topic (that I've
not noticed until today)


*The frontend would store, for now, 5 types of data:

#. Input: this is python/ipython code to be executed.

#. Output (python): result of executing Inputs.

#. Standard output: from subprocesses.

#. Standard error: from subprocesses.

#. Text: arbitrary text. For now, we'll just store plain text and will defer
to the user on how to format it, though it should be valid reST if it is
later to be converted into html/pdf.

The non-text cells would be stored on-disk as follows::

.. input-cell::
:id: 1

3+3

.. output-cell::
:id: 1

6

.. input-cell::
:id: 2

ls

.. stdout-cell::
:id: 2

a.py b.py

.. input-cell::
:id: 3

!askdfj

.. stderr-cell::
:id: 3

sh: askdfj: command not found*


This document clears some ideas, since the natural way for an IPython's
frontend (not only IPythonQt) to load data is rst in wich Python's and
IPython's documentation is written.

Still I want to resume this discussion because there are still some points
to clear such exporting and importing formats or if the saved session should
write also the output, etc.

I want to do this because I think it is not  so difficult to implement and
it should be part of the first release.

best regards.


On 16 April 2010 18:31, Gerardo Gutierrez <muzgash.lists at gmail.com> wrote:

> Hi all.
>
> I want to resume a discussion that I had with Fernando here in Medellín a
> month or 2 ago and we agreed that it was an importatn part of the design of
> this project that has to be asked here.
>
> That is about the format in wich IPythonQt should save sessions for
> reloading.
> We were thinking ahead with the project trying to make a help widget
> similar to the one in mathematica(that is the best characteristic of it) so
> the help widget would read form a website like python's tutorial and put the
> code blocks in IPythonQt's cells of code and the text in text cells, this
> will be then writing a parser for plain text or HTML(it's better the first
> option i think) because those are natural ways for a QTextEdit to interpret
> a webpage.
> Then it will be natural to write the notebook sessions as plain text or
> HTML.
> We talked also about saving the sessions in rst format that will be native
> for ipython's documentation. I've not really evaluated the pros and cons of
> this choice.
>
> This is an important part for the design of every client/interface that'll
> talk to ipython's kernel, so they can share the same type of documentation.
>
> Have a good day.
>
>
> Best regards.
>
>
> https://code.launchpad.net/~ipython-contrib/ipython/qt-frontend
> http://ipythonqt.blogspot.com/
> http://ipython.scipy.org/moin/GSoC2010/IPythonQt
> --
> Gerardo Gutiérrez Gutiérrez <http://he1.udea.edu.co/gweb>
> Physics student
> Universidad de Antioquia
> Computational physics and astrophysics group (FACom<http://urania.udea.edu.co/sites/sites.php>
> )
> Computational science and development branch(FACom-dev<http://urania.udea.edu.co/sites/facom-dev/>
> )
> Usuario Linux #492295
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20100417/ccd5adb7/attachment.html>


More information about the IPython-dev mailing list