OSDir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] Dealing with tone in an email


On Sun, May 6, 2018 at 10:22 AM, Ivan Pozdeev via Python-Dev
<python-dev at python.org> wrote:
> Well, this _is_ a big deal. As in, "with 15+ years of experience, 5+ with
> Python, I failed to produce a working GUI in a week; no-one on the Net,
> regardless of experience, (including Terry) is ever sure how to do things
> right; every online tutorial says: "all the industry-standard and expected
> ways are broken/barred, we have to resort to ugly workarounds to accomplish
> just about anything"" big deal. This is anything but normal, and all the
> more shocking in Python where the opposite is the norm.
>
> And now, a disaster striked. Not knowing this, I've relied on Tkinter with
> very much at stake (my income for the two following months, basically), and
> lost. If that's not a testament just how much damage Tkinter's current state
> actually does, I dunno what is.

What exactly didn't work? I don't understand. What online tutorials
are telling you that everything is broken, and how can you lose two
months' income because things are exactly as broken as everything
tells you?

As far as I can tell, you ran into problems when you tried to put GUI
operations onto a thread other than the main thread. Okay, so maybe
that's a limitation that bit you, but I can't accept that this is
"industry-standard". In fact, I would be much more inclined to say
that the industry standard is single-threaded code, given how
terrified a lot of people are of concurrency in general. (Not
everyone, but a lot of people.) As long as your GUI operations happen
on your main thread, you should be fine. I told my brother about that
consideration recently, and the solution was simple: instead of doing
socket operations on the main thread and GUI operations on a secondary
thread, just switch them around. It's really that simple. So what
actually went wrong when you tried, and how did you manage to get so
far into it before disaster that you lost two months' income?

Tkinter is an important part of Python's ecosystem. It isn't the
greatest GUI toolkit (and it isn't trying to be), and it isn't
stopping people from using GTK or Qt or wxWindows, but Tk and Tkinter
can be depended on much more easily, since that's part of the standard
library. If they were "broken" or "unusable", people would have
figured that out by now. so that part is very definitely exaggeration.
So if your words are not just empty hyperbole, be specific: what is
broken? If I'm considering using Tkinter for something, what
*precisely* do I need to be aware of? Is it just using Tkinter from
threads other than the main thread?

ChrisA