#10 Python and Import All Sometimes Jam Up

closed
nobody
None
5
2007-04-12
2005-11-14
No

On pressing the Python and Import All buttons the ">>>"
prompt fails to appear and the program does not
respond. The fault occurs on a random basis.

To correct this, modify the function _waitforoutput in
module drPrompt.py

Replace:
while True:
if text.find(targetoutput) > -1:
return
text = self.addoutput()

with:
while text.find(targetoutput) < 0:
wx.Yeild()
text = self.addoutput()

Although this might still loop waiting for input that
does not arrive it is possible to terminate it by
pressinmg the red End button

Discussion

  • Eur Ing Christopher Thoday

    Logged In: YES
    user_id=187309

    Although this code stops DrPython from hanging up it
    prevents text in the Prompt window from being selected.
    Consequently it is not possible to try an experiment in the
    Python shell and then copy and paste some lines into the
    source editor.

    This problem can be fixed by changing wx.Yield() to
    wx.Yield(True). Sorry I spelt Yield wrongly in the previous
    post.

     
  • Franz Steinhaeusler

    Logged In: YES
    user_id=772872
    Originator: NO

    thanks, applied.

     
  • Franz Steinhaeusler

    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks