2009/11/15 Henrik Rudstrom <hrudst...@googlemail.com>

> Hi
>

Hi Henrik,


>
> I noticed there are no interactive viewer with the xlib graphics backend
> like i've seen for the wx backend. Thought that would be a really nice way
> to learn, so i made a quick attempt to roll out my own using python's
> threading:
>
> in the PAF examples i replaced
> my_context.start_display()
>
> with
>
> class ThreadedView ( threading.Thread ):
>     def __init__(self, context):
>         threading.Thread.__init__(self)
>         self.context = context
>
>     def run ( self ):
>         self.context.start_display()
>
> ThreadedView(my_context).start()
>
>
> This naive implementation promptly threw me a segmentation fault (also
> tried the opposite, creating an InteractiveConsole in a separate thread, but
> as soon as i modified any parameters same story)
>

Whatever the GUI you use, it has to be ran from the main thread (you'll get
this segfault if you try to do the same with wx or Qt). I don't know how
Enthought guys did with IPython, but they managed to overcome the GUI
threading issue, but not with python-xlib.


>
> So my question is: Are there currently any efforts to create an interactive
> viewer for xlib? if not, could anyone give me pointers/hints to how this
> could be done?
>

I don't plan to create a python-xlib based interactive viewer.


>
> Xlib i guess is a more intermediary solution for us poor mac guys (except
> jelle of course) so if the Qt backend is due in to too long time (??) it
> would be a waste to put too much effort in it though.
>

Absolutely. Since python-xlib relies on low level X11 objects/methods, it
would be necessary to develop a completely new python GUI manager from XLib.
I know there is such a project, known as PLWM (http://plwm.sf.net), but
never tested it.

BTW, the python-xlib/PLWM dev teams both released new version of their
softwares yesterday.


> Oh and on the subject of xlib, the menus in the sample apps dont seem to be
> working for me, is this a known issue or just me?
>

As I said a few days ago, I didn't move all the samples yet to the new
graphic driver system. If you want to get them work, you have to replace the
line:
from wxSampleGui import display, start_display
with:
from SimpleGui import display, start_display.


>
> Regards,
>

Best Regards,


>
> Henrik Rudstrom
>

Thomas


>
>
> _______________________________________________
> Pythonocc-users mailing list
> Pythonocc-users@gna.org
> https://mail.gna.org/listinfo/pythonocc-users
>
>
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to