[Edu-sig] LinuxFest and IPython

Kirby Urner urnerk at qwest.net
Tue Apr 20 12:23:39 EDT 2004


Gave a talk at the just concluded LinuxFest in Bellingham (google for
details).  Jeff Sandys ( http://www.seapig.org/JeffSandys ) invited me.
Mine was the only Python talk (Jeff wanted to be sure at least *someone* was
doing Python).

In the course of this presentation, I briefly showed of Ipython
(http://ipython.scipy.org/ ) , which I only recently discovered.  It's
another shell, influenced by Mathematica somewhat.  It has an interesting
way for doing the editor, which is the editor of your choice.  

Cool thing is if you go 'ed myfunction' it takes you right to that line
(provided your editor supports it).  Unfortunately, I had time to learn much
of this stuff *after* showing it in my talk.

My talk was pretty short.  I was partly testing out this way of doing
Powerpoint slides (using Impress/Open Office) where you evolve a class
through several modules, each inheriting from the previous one, so that (a)
at each level you get working code and (b) it all fits on one slide each
time.

Like, with a rational number class (Q), I'll put the __init__ and __repr__
in version 1, then go 'class Q(qv1.Q):' to inherit from it in the next
module, adding __add__ , __neg__ , and __sub__.  Then in the next module
I'll go 'class Q(qv2.Q):' and add __div__ to the 3rd version -- like that.
Each successive version inherits the same __init__, along with other
features of the parents.

This is a way to get around a standard text book problem of elaborating
code.  Do you repeat the whole code swatch, making it longer each time?
With inheritance, you don't repeat, just inherit.  But of course one
wouldn't necessarily want to code this way for real -- it's more just a way
to demonstrate the concepts. 

Kirby





More information about the Edu-sig mailing list