Chaco and PyGTK

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Chaco and PyGTK

Brennan Williams
A simple question that probably doesn't have a simple answer.
Is it possible and how hard would it be to use Chaco in an existing
PyGTK based application?
While I've used Chaco I haven't looked under the hood in any great
detail but I'm assuming it's fairly tightly integrated with Traits and
perhaps Enable with either a wxPython or PyQt/PySide backend. As such it
may not be possible to use it with PyGTK.

Regards

Brennan

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Chaco and PyGTK

Corran Webster
Hi Brennan,

It would be a moderate effort, but wouldn't involve writing an entire TraitsUI backend for PyGTK.  To get (most of) Chaco working, you'd need to implement a new PyGTK backend for Enable, which would (at a minimum), need to display and repaint an appropriate Kiva backend instance (the image backend is probably the easiest) and bind mouse and keyboard events from PyGTK to create the appropriate Enable mouse and keyboard events.  You can probably work out what it might need to look like by looking at the existing backends (Qt, Wx, vtk and pyglet).

A faster way might be to see if you could embed the pyglet backend in PyGTK.

As someone who has message around with Enable internals a bit, I'd estimate it'd take me a couple of days to get something that is starting to work, at least a week to get all the bugs ironed out to the point where you'd be comfortable running Chaco, and probably a while longer before I'd say it was solid enough for production use.  Adjust timings as you feel are needed based on how much digging about you've done in Enable and Kiva.

-- Corran


On Thu, Dec 20, 2012 at 4:20 PM, Brennan Williams <[hidden email]> wrote:
A simple question that probably doesn't have a simple answer.
Is it possible and how hard would it be to use Chaco in an existing
PyGTK based application?
While I've used Chaco I haven't looked under the hood in any great
detail but I'm assuming it's fairly tightly integrated with Traits and
perhaps Enable with either a wxPython or PyQt/PySide backend. As such it
may not be possible to use it with PyGTK.

Regards

Brennan

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Chaco and PyGTK

John Wiggins
Yup. Everything Corran said, with the following caveat: I broke the
pyglet and vtk backends about two years ago and they haven't been
updated to the new api yet. That said, there's plenty of examples to
be had among the Qt, Wx, and null backends (enable.null, enable.qt,
enable.wx).

-- John

On Thu, Dec 20, 2012 at 5:30 PM, Corran Webster <[hidden email]> wrote:

> Hi Brennan,
>
> It would be a moderate effort, but wouldn't involve writing an entire
> TraitsUI backend for PyGTK.  To get (most of) Chaco working, you'd need to
> implement a new PyGTK backend for Enable, which would (at a minimum), need
> to display and repaint an appropriate Kiva backend instance (the image
> backend is probably the easiest) and bind mouse and keyboard events from
> PyGTK to create the appropriate Enable mouse and keyboard events.  You can
> probably work out what it might need to look like by looking at the existing
> backends (Qt, Wx, vtk and pyglet).
>
> A faster way might be to see if you could embed the pyglet backend in PyGTK.
>
> As someone who has message around with Enable internals a bit, I'd estimate
> it'd take me a couple of days to get something that is starting to work, at
> least a week to get all the bugs ironed out to the point where you'd be
> comfortable running Chaco, and probably a while longer before I'd say it was
> solid enough for production use.  Adjust timings as you feel are needed
> based on how much digging about you've done in Enable and Kiva.
>
> -- Corran
>
>
> On Thu, Dec 20, 2012 at 4:20 PM, Brennan Williams
> <[hidden email]> wrote:
>>
>> A simple question that probably doesn't have a simple answer.
>> Is it possible and how hard would it be to use Chaco in an existing
>> PyGTK based application?
>> While I've used Chaco I haven't looked under the hood in any great
>> detail but I'm assuming it's fairly tightly integrated with Traits and
>> perhaps Enable with either a wxPython or PyQt/PySide backend. As such it
>> may not be possible to use it with PyGTK.
>>
>> Regards
>>
>> Brennan
>>
>> _______________________________________________
>> Enthought-Dev mailing list
>> [hidden email]
>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>
>
>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Chaco and PyGTK

Jonathan March
If that sounds like more time than you have, would you settle for a Chaco app communicating with your PyGTK app via some kind of IPC, whether shared memory or zmq or ...?


On Thu, Dec 20, 2012 at 5:36 PM, John Wiggins <[hidden email]> wrote:
Yup. Everything Corran said, with the following caveat: I broke the
pyglet and vtk backends about two years ago and they haven't been
updated to the new api yet. That said, there's plenty of examples to
be had among the Qt, Wx, and null backends (enable.null, enable.qt,
enable.wx).

-- John

On Thu, Dec 20, 2012 at 5:30 PM, Corran Webster <[hidden email]> wrote:
> Hi Brennan,
>
> It would be a moderate effort, but wouldn't involve writing an entire
> TraitsUI backend for PyGTK.  To get (most of) Chaco working, you'd need to
> implement a new PyGTK backend for Enable, which would (at a minimum), need
> to display and repaint an appropriate Kiva backend instance (the image
> backend is probably the easiest) and bind mouse and keyboard events from
> PyGTK to create the appropriate Enable mouse and keyboard events.  You can
> probably work out what it might need to look like by looking at the existing
> backends (Qt, Wx, vtk and pyglet).
>
> A faster way might be to see if you could embed the pyglet backend in PyGTK.
>
> As someone who has message around with Enable internals a bit, I'd estimate
> it'd take me a couple of days to get something that is starting to work, at
> least a week to get all the bugs ironed out to the point where you'd be
> comfortable running Chaco, and probably a while longer before I'd say it was
> solid enough for production use.  Adjust timings as you feel are needed
> based on how much digging about you've done in Enable and Kiva.
>
> -- Corran
>
>
> On Thu, Dec 20, 2012 at 4:20 PM, Brennan Williams
> <[hidden email]> wrote:
>>
>> A simple question that probably doesn't have a simple answer.
>> Is it possible and how hard would it be to use Chaco in an existing
>> PyGTK based application?
>> While I've used Chaco I haven't looked under the hood in any great
>> detail but I'm assuming it's fairly tightly integrated with Traits and
>> perhaps Enable with either a wxPython or PyQt/PySide backend. As such it
>> may not be possible to use it with PyGTK.
>>
>> Regards
>>
>> Brennan
>>
>> _______________________________________________
>> Enthought-Dev mailing list
>> [hidden email]
>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>
>
>
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev