cjprecord / editra-plugins

Automatically exported from code.google.com/p/editra-plugins
0 stars 0 forks source link

PyShell may be conflict with ipyshell #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What Plugin does this relate to?

What steps will reproduce the problem?
1. when the ipyshell view was opened, then if you type 'help', 'copyright',
'credits' or 'license' in the pyshell window, it will freeze.
2.
3.

What is the expected output? What do you see instead?

What version of Editra are you using? On what operating system?
Platform Info: (linux2, python 2.5.1,wxGTK 2.8.7.1, unicode, gtk2,
wx-assertions-off, SWIG-1.3.29)

Please provide any additional information below.

Original issue reported on code.google.com by seasky...@gmail.com on 17 Aug 2008 at 1:13

Attachments:

GoogleCodeExporter commented 9 years ago
Confirmed. It seems that IPyShell is connecting to stdout on a separate thread 
and
when it trys to read the output generated by other commands. Since it is 
sharing the
same python instance that the IPyShell and Editra are using the conflict occurs.

Here is a sample traceback from trying to run any command that prints output.

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "build/bdist.macosx-10.3-i386/egg/IPython/Prompts.py", line 545, in __call__
    cout_write(self.output_sep)
  File "build/bdist.macosx-10.3-i386/egg/IPython/gui/wx/ipython_view.py", line 253,
in asyncWrite
    wx.MutexGuiEnter()
  File
"//usr/local/lib/wxPython-unicode-2.8.8.1/lib/python2.5/site-packages/wx-2.8-mac
-unicode/wx/_misc.py",
line 741, in MutexGuiEnter
    return _misc_.MutexGuiEnter(*args)
PyAssertionError: C++ assertion "!wxThread::IsMain()" failed at
/BUILD/wxPython-src-2.8.8.1/src/mac/carbon/thread.cpp(1697) in 
wxMutexGuiEnter():
main thread doesn't want to block in wxMutexGuiEnter()!

This indicates a threading issue. It may be better solved by using CallAfter or 
by
posting events to the main gui thread from the other thread(s) in ipyshell_view.

Cody

Original comment by CodyPrec...@gmail.com on 17 Aug 2008 at 3:29

GoogleCodeExporter commented 9 years ago
Yep that's a threading issue. Will work on it as I'm on holidays for a full 
week ;)
Will check your ideas.

Original comment by laurent....@gmail.com on 17 Aug 2008 at 7:19

GoogleCodeExporter commented 9 years ago
Corrected in last SVN commit.
It was not a threading problem finally. Ipython instance when created was 
corrupting
sys.displayhook.

Original comment by laurent....@gmail.com on 24 Aug 2008 at 9:30

GoogleCodeExporter commented 9 years ago
Move old 'fixed' issues to verified

Original comment by CodyPrec...@gmail.com on 3 Feb 2009 at 8:18