[Tkinter-discuss] Tkinter with extension in C

Igor Novikov igor.e.novikov at gmail.com
Fri Mar 5 17:22:56 CET 2010


Hi Vasilis!

You can try using tkpath extension as an example of such drawing. But there
is a simpler way. You can use regular Frame configured with empty background
value:

frame['background']=''

Such frame option stops Tk frame refresh so your drawing will not be cleared
after different window events. To start drawing you just need to get window
ID or XID+Display
(for XWin system) from Tcl interpreter. Also you can using multiplatform
built-in Tk C-functions for drawing to simplifity your code base. But
unfortunately this functionality doesn't
provide antialiased graphics.

Regards,

Igor Novikov
sK1 Project
http://sk1project.org

On Fri, Mar 5, 2010 at 10:14 AM, Vasilis Vlachoudis <
Vasilis.Vlachoudis at cern.ch> wrote:

> Hi all,
>
> I have an application that it requires to plot the result from some heavy
> calculation. Python is slow, so I am writing the calculation part as a C++
> extension for python. Is it possible to draw directly to a Canvas opened
> from Tkinter from the C++ extension, in order to avoid useless transfer of
> data from C++ to python to tkinter?
>
> vasilis
>
>
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20100305/d547f03e/attachment.html>


More information about the Tkinter-discuss mailing list