Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#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

  • 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.

     
  • Logged In: YES
    user_id=772872
    Originator: NO

    thanks, applied.

     
    • status: open --> closed