GUIs - A Modest Proposal

R

rantingrick

This is a silly argument.

REs are not full programming languages, even from a theoretical point
of view, aMSN is written in Tcl, as wikipedia would have told you, and
having to depend on the tools of another language to get commonly
desired functionality is not a good thing for a programming language.

Geremy Condra

It's just more cannon fodder to distract attention from and obfuscate
the real problem. It blows my mind... The same people who would fight
to the death to protect Tkinter's existence in the stdlib never use
the library anyway and personally hate it! Does this make any sense to
anyone with normal brain function? Not to me. It perplexes me to no
end! Why do you protect that which you hate? But the even better
question is why do you also fight against any attempt to make it
better? hmm...? Talk about ironic!

We have a problem and we need some good community discussion to bring
about a solution. If all you have to say is...

"""I don't use Tkinter so i don't care!""""
or
"""I don't even use GUI's so i don't give a flying fig!"""
or
"""I can't get the GUI i want so screw all of you and the GUI you're
pushing!"""
or
"""I'm just trolling for the sake of trolling because i like to read
my own press"""

.... well just keep your negativity to yourself. When you have real
solutions or real ideas that could foster real solutions then for
Pete's sake bring them forth and let them be weighed in the balances
of truth. But i can tell you right now, everyone will have to
sacrifice something to get the perfect GUI for Python. Yes you heard
me correctly, the perfect GUI for Python! Not the perfect GUI for you,
me, or even xah lee!

There is a bright side, this is the best discussion i have witnessed
on this subject in two years (Probably due to fact that i did not
instigate the discussion). So the question is what should we do and
how should we do it?

- We can fix Tkinter by making it lean and mean.
- We can start fresh and really create something very Pythonic.
- We can do nothing and sit around for another two years complaining
like premenstrual Prima donna's.

So keep the ideas rolling in people. We need to hear from every side
of this forum.
 
K

Kevin Walzer

The same people who would fight
to the death to protect Tkinter's existence in the stdlib never use
the library anyway and personally hate it!

I want to keep it in the stdlib because I use it for all my apps, and
personally prefer it to any other GUI toolkit out there.
 
M

Mark Lawrence

It's just more cannon fodder to distract attention from and obfuscate
the real problem. It blows my mind... The same people who would fight
to the death to protect Tkinter's existence in the stdlib never use
the library anyway and personally hate it! Does this make any sense to
anyone with normal brain function? Not to me. It perplexes me to no
end! Why do you protect that which you hate? But the even better
question is why do you also fight against any attempt to make it
better? hmm...? Talk about ironic!

We have a problem and we need some good community discussion to bring
about a solution. If all you have to say is...

"""I don't use Tkinter so i don't care!""""
or
"""I don't even use GUI's so i don't give a flying fig!"""
or
"""I can't get the GUI i want so screw all of you and the GUI you're
pushing!"""
or
"""I'm just trolling for the sake of trolling because i like to read
my own press"""

... well just keep your negativity to yourself. When you have real
solutions or real ideas that could foster real solutions then for
Pete's sake bring them forth and let them be weighed in the balances
of truth. But i can tell you right now, everyone will have to
sacrifice something to get the perfect GUI for Python. Yes you heard
me correctly, the perfect GUI for Python! Not the perfect GUI for you,
me, or even xah lee!

There is a bright side, this is the best discussion i have witnessed
on this subject in two years (Probably due to fact that i did not
instigate the discussion). So the question is what should we do and
how should we do it?

- We can fix Tkinter by making it lean and mean.
- We can start fresh and really create something very Pythonic.
- We can do nothing and sit around for another two years complaining
like premenstrual Prima donna's.

So keep the ideas rolling in people. We need to hear from every side
of this forum.

Please be so kind as to stop using the term we when you (singular) mean
you (singular). Frankly I wouldn't consider writing a single line of
code along these lines as it's a complete non starter. My preference is
for the good old command line, mainly because research I read,
admittedly years ago, stated that using said beast was far more
efficient for experienced users than a GUI. If more recent research
suggests that this has changed then great, I'll just sit back and wait
until you (singular) write the code to provide the perfect GUI for
Python. I look forward to seeing the 0.01 release on 31/12/2015, if I'm
lucky.

Kindest regards.

Mark Lawrence.

p.s. as Stephen D'Aprano asked r u r?
 
G

geremy condra

True, but some theoretical extension to REs could be. If I've understood
correctly, Perl's regexes aren't actually regular expressions any more
(they're a superset) and might even be Turing Complete.

I hereby theorize an extension to python that allows it to cook toast.
Therefore, python is a toaster.
In any case, the point is not that you can or can't write your entire
application using a RE. The point is that regexes are a mini-language, a
DSL, not written directly in Python.

So is the string formatting mini-language. I wouldn't get all wrapped
up in the idea that its ok to include anything that can be called a
language just because we have RE support.
I don't see why you think so. Python is specifically designed to be a
glue language, to bring together functionality from disparate components
written in other languages and provide a user-friendly language around
them. Fundamentally, what's the difference between these?

I didn't argue that Tcl is bad. I argued that a dependency on it is
bad for python. Would you argue that Python should ship with
Perl and Java because there are best-of-breed tools in those
languages and python could leverage that? Of course not.
* CPython relies on Tk/Tcl for a GUI

Unfortunately true.
* CPython relies on a C library for regular expressions

Irrelevantly true.
* IronPython relies on the .Net environment for everything

Since .Net (effectively) depends on Windows, I suggest that
IronPython should ship with Windows as well. After all, many
languages depend on the operating system- why should it be
so much worse to ship with one?
* Jython relies on Java libraries for many things

See above.
I don't see why that first one is so much worse than the others. Sure, it
adds an extra dependency to installing Python for GUI programming, but
that's no different to any other GUI toolkit: PyQt has Qt as a
dependency, PyGtk has Gtk as a dependency, etc. (I trust you're not
suggesting that every language needs to create its own fully-independent
GUI toolkit that talks directly to the hardware!)

But we don't have any of those in the standard library.
What does it matter that Tk is Turing Complete and Qt or Gtk aren't?

I wouldn't support including either of the above either, but it matters
because it's a top-ten programming language that has to bootstrap
its way into usefulness in a common part of the field in a pretty
unclean way.
In any case, if you consider Tkinter is harmful, don't use it. It isn't
like GUI programming in Python relies on it, there are alternatives.

You won't hear an argument out of me about pulling it out or leaving
it in- I think it was a bad decision to depend on it, but that it's too
late now and that's that.

Geremy Condra
 
R

rantingrick

Hmmm... there's something terribly familiar about this style of speech...
rantingrick, did you used to post under the name "r" using an gmail
account starting with "rt8"?


Steven, i've always thought of you as one of the more intelligent
readers of this list and again you have proven me correct. It's good
to be in the company of peers. ;-)

ps: Except you may want to refrain from using the phrase "used to" and
instead use a more proper grammar of "previously", but i digress.
 
A

Adam Tauno Williams

Since .Net (effectively) depends on Windows,

100% False; not "effectively" true at all. I run [and develop] .NET
applications on LINUX every day. IL and the CLR are standards.
But we don't have any of those in the standard library.

I just don't see why this is an issue? Every, or pretty darn close,
significant Python application depends on 3rd party
modules/component/libraries.
 
A

Adam Tauno Williams

We have a problem

No, we don't. Or at least, I don't.
"""I don't use Tkinter so i don't care!""""
+1

... well just keep your negativity to yourself. When you have real
solutions or real ideas that could foster real solutions then for
Pete's sake bring them forth and let them be weighed in the balances
of truth. But i can tell you right now, everyone will have to
sacrifice something to get the perfect GUI for Python.

And I'll be riding winged Unicorn's in New York's Time Square tomorrow.
That's as likely as a "perfect GUI" (whatever that means).
Yes you heard
me correctly, the perfect GUI for Python! Not the perfect GUI for you,
me, or even xah lee!

A "perfect GUI for Python" is just a nebulous fantasy.
There is a bright side, this is the best discussion i have witnessed
on this subject in two years (Probably due to fact that i did not
instigate the discussion). So the question is what should we do and
how should we do it?
- We can fix Tkinter by making it lean and mean.
- We can start fresh and really create something very Pythonic.
- We can do nothing and sit around for another two years complaining
like premenstrual Prima donna's.

Option #4 - we can continue to very effectively develop solutions with
the situation as it is. Witness the awesome Zeitgeist application in
GNOME 3 - a GUI, developed in *gasp* Python. A real working solution
that is part of a major project... Hmmmm.
So keep the ideas rolling in people. We need to hear from every side
of this forum.

Meanwhile everyone who disagrees with you will be told "well just keep
your negativity to yourself". So much for "every side".

Signing out of this thread.
 
R

rantingrick

I want to keep it in the stdlib because I use it for all my apps, and
personally prefer it to any other GUI toolkit out there.


Now thats a valid argument and i thank you for it. I also use Tkinter
quite extensively and it would hurt me to see it go but it cannot stay
the way it exists today. So if we are to keep Tkinter let's get behind
a real effort to fix this damn thing once and for all! There are many
ways people can get behind an effort. They can jump on board and start
writing code or even just say

""" Hey, i don't really use Tkinter (or GUI) but i would like to see a
Python stdlib that is up to date so you have my vote! +1"""

IDLE is also in dire need of an upgrade...

- It does not exit gracefully from some actions
- Error dialogs don't properly return focus to main window
- Replace/Find dialogs are not transient
- The home button should move the cursor one space after ">>> |" (not
in front of it "|>>>")
- A "... " spacer should be inserted automatically in blocks
- Copy should remove leading ">>> " chars
- When using the replace dialog sometimes the highlight does not work
and you can't see which (if any) word is about to be replaced
- In the TabbedPages widget the tabs are almost invisible
- The class browser should be available all the time in a panned
window
- and more...

But the relentless hoards will parrot off negativity...

""" But i don't use IDLE so i don't care!"""

....Ok then zip your lips and let the ones who do care talk!
 
G

geremy condra

Since .Net (effectively) depends on Windows,

100% False;  not "effectively" true at all.  I run [and develop] .NET
applications on LINUX every day.  IL and the CLR are standards.

Fine, then they can ship it with Linux too, just for you. My point
stands.
I just don't see why this is an issue?  Every, or pretty darn close,
significant Python application depends on 3rd party
modules/component/libraries.

What does that have to do with the python itself?

Geremy Condra
 
R

rantingrick

Yes, thank you, Steven, for identifying this irritant. I'll add
identity-hopping to the list of offenses, and add this new identity to
my kill-file.

So you put up with my antics fine up until you learned of my past
identity. So now i am somehow so annoying as to require a plonking.
NEWS FLASH! I am the same person i was 1 minute ago, 1 hour ago, 1 day
ago, 1 week ago... the only thing that has changed is your perception
of me. Now i ask of you Ben, who is flawed?

Einstien said:
"""Reality is merely an illusion, albeit a very persistent one."""

Its seems poor Ben is a victim of his own limited reality. Very sad. :
(
 
R

Robert Kern

So you put up with my antics fine up until you learned of my past
identity. So now i am somehow so annoying as to require a plonking.
NEWS FLASH! I am the same person i was 1 minute ago, 1 hour ago, 1 day
ago, 1 week ago... the only thing that has changed is your perception
of me.

It means that he, very charitably, gives new irritants the benefit of the doubt.
By changing identities, you are abusing this good behavior. By connecting your
identity to the previous one, his doubt is removed.
> Now i ask of you Ben, who is flawed?

Still you.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 
S

Steven D'Aprano

I didn't argue that Tcl is bad. I argued that a dependency on it is bad
for python. Would you argue that Python should ship with Perl and Java
because there are best-of-breed tools in those languages and python
could leverage that? Of course not.

Surely that depends on the tool, how difficult it would be for Python to
duplicate the functionality, and how important it is to provide the tool
as a standard product.

In any case, Python doesn't ship with Tcl and Tk. They are dependencies
*only if you use Tkinter*. It's not compulsory.


[steve@sylar ~]$ python2.6
Python 2.6.4 (r264:75706, Feb 1 2010, 13:33:07)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/lib-tk/Tkinter.py", line 39, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter


Now, we might argue that the Python standard library "must" have a GUI
toolkit, in which case it's going to have some non-trivial dependency. I
don't see why it's so much worse to depend on Tcl/Tk compared to some
other external toolkit.

And even if it were undesirable to rely on any external toolkit, I don't
think it's terribly likely that with the resources available to the PSF
anyone is going to create Yet Another GUI Toolkit specifically for
Python. We might agree that, in a perfect world, it would be nice if
Python had no external dependencies at all (well, apart from the OS of
course), but it isn't going to happen anytime soon. Not unless you're
volunteering? :)
 
G

geremy condra

Surely that depends on the tool, how difficult it would be for Python to
duplicate the functionality, and how important it is to provide the tool
as a standard product.

Well, I guess that's where we more or less differ. If I felt like there
were a piece of infrastructure for my language so critical that I
simply had to drag java along to have it, I would seriously question
whether it was worth my time to pursue the project at all.
In any case, Python doesn't ship with Tcl and Tk. They are dependencies
*only if you use Tkinter*. It's not compulsory.

<snip>

Tkinter- its not only capable of making terrible-looking UIs, its also
capable of not being there when you need it! This is not a point in
its favor.
Now, we might argue that the Python standard library "must" have a GUI
toolkit, in which case it's going to have some non-trivial dependency. I
don't see why it's so much worse to depend on Tcl/Tk compared to some
other external toolkit.

I don't argue that. I don't think it or any other GUI toolkit belong in the
stdlib, although if I had to pick one I'm pretty sure Tkinter wouldn't be
it.
And even if it were undesirable to rely on any external toolkit, I don't
think it's terribly likely that with the resources available to the PSF
anyone is going to create Yet Another GUI Toolkit specifically for
Python. We might agree that, in a perfect world, it would be nice if
Python had no external dependencies at all (well, apart from the OS of
course), but it isn't going to happen anytime soon. Not unless you're
volunteering? :)

Actually, I've had to do pretty much this on two separate occasions,
and its not fun. Part of the reason why I like the idea of a sumo
distribution- you can keep the core trim and low-dependency, while
making sure that platforms where bits are cheap have the goodies
that developers want.

Geremy Condra
 
R

rantingrick

It means that he, very charitably, gives new irritants the benefit of the doubt.
By changing identities, you are abusing this good behavior. By connecting your
identity to the previous one, his doubt is removed.

And again you miss the very meat and potatoes of my post. Sadly like
Ben you're so blinded by animosity that you cannot see. He kill-filed
me because he is so vehemently against me on a personal level. So much
against me that even the sight of the very words i write send him into
fits of uncontrollable rage. This must be the case or why would he
need to hide his eyes completely from my words. Could he not just
exercise a bit of self restraint and skip my posts if they start to
annoy too much? Apparently not. He is unable to control his actions so
he must go to the extreme of kill-file.

But you know i think it boils down to fear really. He is comfortable
in his life and wishes to keep it as cookie cutter as he can. Any
outside influence must be quashed before these meddling forces can
take hold of him. He is so fearful of seeing the light in an opposing
argument that blinding himself from reality is easier than facing
reality.

Insane asylums are filled to the rafters with these people. They walk
around with tin foil wrapped around their heads supposedly because
cell phone towers are "really" mind control devices. Well at least
thats their side of the story ;-). You can also compare this attitude
to a heart transplant recipient who says he doesn't want the heart if
it came from a black, brown, or yellow person. In that case the hatred
is race based but it is exactly the same thing as we have here. Hate
is hate no matter what "form" it takes or "excuse" it makes.

But in the end, the only person who suffers is the harborer of hate. I
sorry Ben hates me so much but i cannot change this, only he can. I do
hope he relieves himself from his cocoon of hate and misery and then
metamorphosis into a free and happy life. But again that is up to our
friend Ben.

Good night folks.
 
S

Steven D'Aprano

We have a problem

You keep saying that, but you've given no good reasons for why we should
believe you, or what the nature of this problem supposedly is.

The current situation has broad community support: there's a relatively
lightweight GUI toolkit that ships with Python (Tkinter), even if it's
not beloved by all neither is it especially hated, and an extremely
healthy ecosystem of many alternative GUIs built on top of Qt, wxWindows,
GTK+, and others. Where's the problem?


So keep the ideas rolling in people. We need to hear from every side of
this forum.

I think the only way to end this pointless discussion is this:

"Hitler would have loved Tkinter!"

Now that we've run into Godwin's Law, can we get back to something more
productive? No need to thank me.
 
R

Robert Kern

And again you miss the very meat and potatoes of my post. Sadly like
Ben you're so blinded by animosity that you cannot see. He kill-filed
me because he is so vehemently against me on a personal level.

You can read minds?
So much
against me that even the sight of the very words i write send him into
fits of uncontrollable rage.

And clairvoyance! Such wonders!
This must be the case or why would he
need to hide his eyes completely from my words. Could he not just
exercise a bit of self restraint and skip my posts if they start to
annoy too much?

Yes, he is. He happens to be using a technological aid in order to do so
efficiently. You misunderstand the purpose of a kill-file.
Apparently not. He is unable to control his actions so
he must go to the extreme of kill-file.

But you know i think it boils down to fear really. He is comfortable
in his life and wishes to keep it as cookie cutter as he can. Any
outside influence must be quashed before these meddling forces can
take hold of him. He is so fearful of seeing the light in an opposing
argument that blinding himself from reality is easier than facing
reality.

Ah, so you are a psychoanalyst, too? Amazing!

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 
G

geremy condra

On 6/9/10 1:12 AM, rantingrick wrote:


Ah, so you are a psychoanalyst, too? Amazing!

How do you think he mad so many incorrect predictions, eh?

Geremy Condra
 
G

Gregory Ewing

Kevin said:
PyGUI ... certainly is *not* a lightweight GUI toolkit that could
easily be incorporated into the Python core library--it instead has
rather complex dependencies on both other GUI toolkits and Python
wrappers of those toolkits.

I don't see how the dependencies could be regarded as "complex".
There's more or less only one on each platform, and they're
pretty standard accessories for the platform concerned. You could
say there are two on Linux if you count gtk itself, but you almost
certainly already have it these days if you're running any
kind of desktop at all.

It's true that just having PyGUI itself in the standard library
wouldn't be sufficient, but that's also true of Tkinter today --
you need Tcl/Tk installed in order to use it, and that doesn't
come bundled with Python on all platforms. The same thing
applies to some other stdlib modules, such as sqlite. So just
having a dependency doesn't necessarily preclude a package from
being included in the stdlib.

Having said all that, I would like to eliminate some of the
depedencie. At some point I'll probably re-do the Windows
implementation using ctypes, because pywin32/mfc is hindering
more than helping in some areas. I'm also thinking about ways
to interface directly with Cocoa without going through pyobjc.
But all that is some way off in the future after I get the API
nailed down more.
 
G

Gregory Ewing

Martin said:
I do think it is technically possible to have your own window manager in
python on x11 but I have no idea if you have equal possibilities on mac
and windows (for example to define your own window decoration).
Though considering tk does just that I would guess this to be the case.

To my knowledge, neither Windows nor MacOSX have a replaceable
window manager in the sense that X11 does. However, it's always
possible for an application to create a window with none of the
standard borders or decorations and fake them itself, which is
what I expect Tk is doing here.
 
G

Gregory Ewing

Lie said:
Much like regex a DSL for matching text, Tcl/Tk is pretty much a DSL for
creating GUI

I can't see any things about the tcl language that make
it especially good for describing GUIs, and even if
there were such things, Tkinter pretty much hides the
existence of tcl completely, so you wouldn't get any
advantage from them in Python anyway.

(And BTW the DSL conventionally used to express regexps is
*horrible* for anything but the very simplest ones, IMO.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top