From: bart.c on

"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.

--
Bartc

From: Terry Reedy on
On 6/8/2010 4:50 AM, Arndt Roger Schneider wrote:
> Terry Reedy schrieb:

>> Googling further, I found canvasvg.py at
>> http://wm.ite.pl/proj/canvas2svg/index.html
>> via an answer to a question at
>> http://bytes.com/topic/python/answers/629332-saving-output-turtle-graphics

> That was it! Be aware only tk canvas elements are exported to SVG by this
> package.

That is all I need at the moment, with no embedded controls, just lines,
fills, and a few text labels.

> Jeszra on the other hand converts an entire GUI into SVG.

I had the impression, without diving deeply into the doc, that jeszra is
not something I can call from a Python program but is a stand-alone app
for designing guis, with one of the output possibilities being svg and
another tkinter-based classes that could be used in a Python program.

I will look into it further when I need that.

> I don't have any experience with this python package--for obvious reasons.
> What you should look after is how raster images are included in the
> generated SVG; and try each of the 12 different arrow shapes for tk line.

Thanks for the hint.

Terry Jan Reedy


From: Grant Edwards on
On 2010-06-08, bart.c <bartc(a)freeuk.com> 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?

Technically, no. But, that's what the maintainers have chosen to do
in order to reduce the amount of work needed.

> Why not: (Pyton ->) Tkinter-API -> Xlib ?

Because maintain a set of Python bindings for Tk would be a lot more
work.

> 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.

I'm not sure what you're asking. Are you asking why not develop
Python bindings for the Tk library the way other languages (e.g.
Scheme) did instead of having Tcl as a glue layer?

>
>>> 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.

Some of us think is a crappy language. I wrote one small app in Tcl.
When I tried to write something a bit more sophistacated it was quite
clear that Tcl is a glue language, not a real application development
language. I switched to Scheme (which had Tk bindings) and later to
Python.

--
Grant Edwards grant.b.edwards Yow! Do you guys know we
at just passed thru a BLACK
gmail.com HOLE in space?
From: David King on
> My concern is simple: I think that Python is doomed to remain a minor
> language unless we crack this problem.

But making *another* "one true GUI library" just fragments it further.

Nobody designs a GUI library intending it to suck.
From: Carl Banks on
On Jun 8, 10:22 am, Grant Edwards <inva...(a)invalid.invalid> wrote:
> On 2010-06-08, bart.c <ba...(a)freeuk.com> wrote:
> >  Why not: (Pyton ->) Tkinter-API -> Xlib ?
>
> Because maintain a set of Python bindings for Tk would be a lot more
> work.

That would be Tk-API.

Tkinter-API means write a GUI toolkit that has the same API as
Tkinter, which is s Python module. So he suggests a native Python
toolkit (written as Python code or a C extension or both), that can
serve as a drop-in replacement for Tk-inter, that bypasses Tcl and Tk
altogether.

In the absense of other factors, it probably is better for an
interpreter for a language that claims to be a powerful for general-
purpose applications not to run another general-purpose interpreter to
do a common task like GUI. Those other factors aren't absent though.


Carl Banks