[IPython-dev] wxIPython and wx
Fri Apr 25 02:47:47 CDT 2008
Ok I see you want to instanciate wx object from within the shell.
I haven’t tested GUI direct call within the widget.
As the widget is wx one, there should not have error and could be possible. I had a discussion with a guy previously on this mailing because he wanted to play with wx/qt/etc with ipython widget.
The main problem is that in that case he needed in fact that ipython shell run in it’s own process separated from wx one.
In your case, do you want to only interact with YOUR wx loop (that is the wx ipython widget loop)?
If yes, should be possible. I will take a look at your bug tonight (in ~12hours).
Sure it can work, and moreover should be really interesting to do that J!
I suspect that the ipython instance (not the widget) behind the scene has not the same globals/locals scope as your root app.
So it can directly interact with wx loop. (perhaps, I’m saying dumb things).
I think we have to pass globals/locals to the ipython shell.(there is parameters for this, but haven’t tried it this well)
Will try tonight.
By the way on which linux are you working? (version needed too, to reproduce the bug)
On windows, doing that just spawn a window, and kill it instantaneously…
De : firstname.lastname@example.org [mailto:email@example.com] De la part de Igor Sylvester
Envoyé : vendredi 25 avril 2008 07:32
À : Laurent Dufréchou; ipython-dev
Objet : wxIPython and wx
I was playing with wxIPython today and I wasn't able to spawn new wx objects within the shell.
>>> import wxIPython
Then, in the wxIPython shell, I typed:
>>> import wx
And the python process died with the following.
Warning! Hook 'show_in_pager' is not one of ['editor', 'fix_error_editor', 'result_display', 'input_prefilter', 'shutdown_hook', 'late_startup_hook', 'generate_prompt', 'generate_output_prompt']
Warning! Hook 'shell_hook' is not one of ['editor', 'fix_error_editor', 'result_display', 'input_prefilter', 'shutdown_hook', 'late_startup_hook', 'generate_prompt', 'generate_output_prompt']
^[[A^[[BXlib: unexpected async reply (sequence 0x31e8)!
Xlib: sequence lost (0x131e8 > 0x4bd8) in reply type 0x0!
The program 'python' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadImplementation (server does not implement operation)'.
(Details: serial 12776 error_code 17 request_code 20 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
I am about to look at the editra source to see how you embed an ipython shell. But, I'd appreciate if you have any insight into this. Specifically, are you able to reproduce this error, or is it a bug in my X?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev