On Aug 26, 7:40 pm, Michele Simionato <[EMAIL PROTECTED]> wrote: > On Aug 26, 5:56 pm, [EMAIL PROTECTED] wrote: > > > Hi, > > to extend my skills, I am learning python. I have written small > > program which computes math expression like "1+2*sin(y^10)/cos(x*y)" > > and similar, so far only + - * / ^ sin con tan sqrt are supported. But > > my program is quite inextensible, I have to change the code to add new > > functions... Could some fellow experienced pythonista give me some > > tips how to make my program shorter, and more extensible? > > I understand that you are doing this as a learning exercise. Still, I > would > recommend you to have a look at the shlex module in the standard > library > and to pyparsing. Looking at their source code should should give you > some > idea. BTW, since you are familiar with Lisp, I would recommend you > IPython > for a better interactive experience. > > Michele Simionato
thanks for the tip! Now I have IPython working nicely. The shell now looks a little like Christmas tree but I think it can be reduced a bit ;) the ?var and auto completion is exactly what I was looking for! Nep -- http://mail.python.org/mailman/listinfo/python-list