[IPython-user] Re: IPython and psyco
thorsten at thorstenkampe.de
Tue May 18 00:02:15 CDT 2004
* David J. C. Beach (2004-05-17 19:02 +0100)
> On Mon, 2004-05-17 at 12:51, Fernando Perez wrote:
>> Thorsten Kampe wrote:
>>> There's been a lot of talk how psyco can speed up one's code without a
>>> code change. I tried it today (psyco 1.1.1 and 1.2) with Python 2.3 in
>>> IPython 0.5 and 0.6 under Cygwin and Gentoo Linux: IPython crashes
>>> badly everytime (even while assigning a string to a variable). Not
>>> even a crash report is generated. - Default Python shell runs without
>>> a problem.
>>> Has anyone ever made IPython interact with psyco?
>> I've never tried. Seeing how ipython is pure python code (no C extensions in
>> there), I honestly don't know why it wouldn't work 'out of the box'. Psyco is
>> dark, black magic, so I suggest you take the issue up with the psyco wizards.
>> If any of the failures is due to an ipython bug, I'll gladly fix it, of
> I've tried IPython with psyco... and I've seen it fail. I believe the
> reason is that IPython tries to look at the stack frames
> (sys._getframe), but once Psyco compiles a certain function, that frame
> object may no longer be available.
> My best advice for using psyco within IPython is:
> (1) don't use psyco.full(), and
> (2) explicitly tell psyco which functions to specialize (optimize)
Indeed, psyco.bind() works, thanks.
More information about the IPython-user