Wednesday, July 14, 2010

8th week log, Mid-term evaluation!

A lot of details about pdb support and the organization of the output cells were discussed this week.
The characteristics added are:
  • The output cells are appended as they appear in the space between th executed cell and the next executable cell. i.e.
  • for i in range(3):
        print i**2
    0
    1
    4
  • When you execute again a cell the previous output cells are erased(if any)
  • If a new cell is created by the program (not the user) the scroll bar goes to its maximum value. This is not the right way to approach the automatic movement of the viewport I know, I'll work on it on the weekend.
  • You can clean the notebook of output cells by clicking a button in evaluate menu.
The last one is part of the details  usually add when my brain is stuck, I try to add a little thing every couple of days.
Today I'm working on subprocess, i.e. communication with the shell. I think I need to create an ipython's instance or inherit InteractiveShell, I'm waiting a hand from Fernando but this shouldn't be too dificult.

I also hope to finish everything planned round next week to put some effort on the highlighting and autoindentation.

Sunday, July 11, 2010

Behind raw_input

This was a pretty heavy week.
there were two ways of approaching the raw_input problem, the right one, and the wrong one(lol):
  • To fill the widget definition with signals and slots which will communicate the different IOs to the mainwindow and this one then will communicate those IOs to the kernel.
  • To import zmq in the ipqt_popup module and manage the communication directly with the kernel.
I innocently chose the fist one (FAIL), "entia non sunt multiplicanda praeter necessitatem".
The widget was almost done when Fernando corrected me the design stating that it will be better to print all the messages from raw_input or pdb in the mainwidow not in a popped up widget.

Fortunately I managed to understand the mechanisms required for this to work correctly and I'm finishing it right now.