From: Martin v. Loewis on 8 Jun 2010 14:08 > TkInter -> Tcl -> Tk -> Xlib > > Is the Tcl intepreter really need to use this GUI? Why not: > > (Pyton ->) Tkinter-API -> Xlib ? Even if this was possible (which it is not), then you still would need the Tcl interpreter: significant parts of Tk are written in Tcl, so Tk won't work without the Tcl interpreter. However, the Tk API doesn't provide all functionality that Tkinter exposes; many features can only be invoked through Tcl. Regards, Martin
From: Grant Edwards on 8 Jun 2010 14:15 On 2010-06-08, Martin v. Loewis <martin(a)v.loewis.de> wrote: >> TkInter -> Tcl -> Tk -> Xlib >> >> Is the Tcl intepreter really need to use this GUI? Why not: >> >> (Pyton ->) Tkinter-API -> Xlib ? > > Even if this was possible (which it is not) Why is it not possible? It seems to have been done for other languages. > then you still would need the Tcl interpreter: significant parts of > Tk are written in Tcl, so Tk won't work without the Tcl interpreter. > > However, the Tk API doesn't provide all functionality that Tkinter > exposes; many features can only be invoked through Tcl. True. Were Tcl removed from the equation, then some feautures would have to be re-implemented in Python. -- Grant Edwards grant.b.edwards Yow! I've read SEVEN at MILLION books!! gmail.com
From: Ethan Furman on 8 Jun 2010 17:14 Grant Edwards wrote: > On 2010-06-08, Martin v. Loewis <martin(a)v.loewis.de> wrote: >>> TkInter -> Tcl -> Tk -> Xlib >>> >>> Is the Tcl intepreter really need to use this GUI? Why not: >>> >>> (Pyton ->) Tkinter-API -> Xlib ? >> Even if this was possible (which it is not) > > Why is it not possible? It seems to have been done for other > languages. > >> then you still would need the Tcl interpreter: significant parts of >> Tk are written in Tcl, so Tk won't work without the Tcl interpreter. >> >> However, the Tk API doesn't provide all functionality that Tkinter >> exposes; many features can only be invoked through Tcl. > > True. Were Tcl removed from the equation, then some feautures would > have to be re-implemented in Python. > So what functionality is available from Tk alone? From the very cursory glance at the source files (mostly the readmes), it seems pretty entwined with Tcl. ~Ethan~
From: Kevin Walzer on 8 Jun 2010 17:51 On 6/8/10 11:17 AM, bart.c wrote: > Some people aren't interested in the amazing language. Only the graphics > API that goes with it. > The Perl folks have stripped the Tk API away from Tcl with the Perl-Tk GUI package: the result is no embedded Tcl interpreter, but it's also hard to maintain. In fact, Perl-Tk has never been updated to run natively on the Mac because of this. There are other Perl/Tk bindings that do integrate the Tcl interpreter, and it makes it much easier for the Perl/Tk bindings to evolve as Tk itself evolves. -- Kevin Walzer Code by Kevin http://www.codebykevin.com
From: Lie Ryan on 8 Jun 2010 18:09
On 06/09/10 01:17, bart.c wrote: > > "Grant Edwards" <invalid(a)invalid.invalid> wrote in message > news:hullf3$hl4$1(a)reader1.panix.com... >> On 2010-06-08, Kevin Walzer <kw(a)codebykevin.com> wrote: >> >>> Since Tk already provides a basic GUI toolset, and Python can interface >>> with it more directly than it can with other toolkits >>> (PyGui -> PyGtk -> Gtk -> Xlib), >> >> Compare that to this: >> >> TkInter -> Tcl -> Tk -> Xlib > > Is the Tcl intepreter really need to use this GUI? Why not: > > (Pyton ->) Tkinter-API -> Xlib ? > > Most of the work of designing a GUI is, well, designing it. That's > already been done for Tkinter so why not just implement the same spec in > Python (with whatever lower-level code is needed). Then extending it > should be simpler. > >>> it's not clear to me what is gained by starting from scratch here. >>> (Is it the presence of the Tcl interpreter? I know Tcl is not to >>> everyone's taste, but it is an amazing language...) > > Some people aren't interested in the amazing language. Only the graphics > API that goes with it. How about shifting the viewpoint a little bit. Tcl is like regular expression engine and the Tk is like the re API. Much like regex a DSL for matching text, Tcl/Tk is pretty much a DSL for creating GUI (anyone knows any real program fully written in non-embedded Tcl?). Nobody complains that python included a regular expression engine in its standard distribution; so why complain that python included a Tcl expression engine in its standard distribution. |