Re: Support for Tkinter

18 views
Skip to first unread message

Jérémie Roquet

unread,
Mar 17, 2017, 8:09:31 AM3/17/17
to G 3, shedskin-discuss
(cc-ed shedskin-discuss as someone else might want to step up)

Hi, thanks for your message,

2017-03-16 18:55 GMT+01:00 G 3 <program...@gmail.com>:
> I was wondering if Tkinter support could be added to Shedskin.

Technically yes, there shouldn't be any major difficulty: add a
dependency on TCL/TK, mimic the module interface in Python for
shedskin to generate the C++ template, fill the generated template by
porting the CPython tkinter module to pure C++.

The last part, however, is still a significant investment in time, I
guess, and not being a tkinter user myself, I've to admit I've neither
the time not the motivation to do the porting myself.

If you're willing to do the porting, though, I'd be more than happy to
give you some pointers to help you through the process, and to merge
any sufficiently working attempt into the shedskin repository.

Best regards,

--
Jérémie

Mark Dufour

unread,
Mar 17, 2017, 9:56:49 AM3/17/17
to shedskin-discuss, G 3
hi all,


2017-03-16 18:55 GMT+01:00 G 3 <program...@gmail.com>:
> I was wondering if Tkinter support could be added to Shedskin.

Technically yes, there shouldn't be any major difficulty: add a
dependency on TCL/TK, mimic the module interface in Python for
shedskin to generate the C++ template, fill the generated template by
porting the CPython tkinter module to pure C++.

not sure if we really want to port complete toolkits. it would be nice if
possible at all in this case, but there is often another way, which is
to use shedskin to generate an extension module for you (shedskin -e).

an extension module of course can be used in a larger (non-compiled)
program. there are several examples of this in the example program testset.

it sometimes requires a bit of puzzling to figure out how to best pass
arguments to/from the extension module, but I really like the approach,
since this way any library may in theory be used in combination with
shedskin-compiled code, and you keep all the flexibility in your main
program.

cheers,
Mark
Reply all
Reply to author
Forward
0 new messages