Saturday, February 4, 2012

spe python(x,y) wxPython2.8 problems

On Ubuntu the nice python editor from Stani (SPE) has started to behave strange since a recent Ubuntu upgrade. When scrolling with the wheel on the mouse lines get stuck. Moves with the cursor keys correct this but it is really annoying. Therefore I now wanted to run SPE on windows with python(x,y). This proved to be a bit more troublesome than expected. After putting the _spe directory obtained from the SPE download on sourcefourge in the site-packages directory of python (\Python27\Lib\site-packages) simply running the script did not work. After running as python --debug from a command prompt I had the same problem as reported here (an error in Throbber.__init__). Luckily the solution reported on that same site also fixed the problem:

Moving initialization of _filename, _running, and _position to before the call to GIFAnimationCtrl.__init__ resolves the problem.

Interestingly on openSUSE I experienced the same problems. But there I also had to edit (_spe\sm\wxp\ In the function setTitle of the class Child(Framework) I commented the calls to self.SetTitle (lines 988-991). Calling self.setTitle instead of self.SetTitle (mark the capital) does not fix the problem (you get a maximum recursion limit error instead). The commenting of the code does not seem to affect the execution of SPE. The only remaining problem on openSUSE with SPE is now that I can only run it as root.

No comments:

Post a Comment