[Tutor] PyGTK: is there a library for both Linux and Windows
Kent Johnson
kent37 at tds.net
Wed Oct 21 20:16:26 CEST 2009
Forwarding to the list with my reply...
On Wed, Oct 21, 2009 at 1:21 PM, Chris Fuller
<cfuller084 at thinkingplanet.net> wrote:
>
> There are workarounds. The point is that they aren't necessary in Linux, and
> usually involve something fishy, like sleeping a (more or less) arbitrary
> period to get the synchronization right, which might work some of the time,
> but not under unusual circumstances (but who cares if its just a GUI update?)
>
> Possibly, the Linux environment is more forgiving, but I don't have similar
> problems in Tkinter, and special treatment isn't necessary if you only access
> the GUI via the main thread.
>
> http://faq.pygtk.org/index.py?file=faq20.006.htp&req=show
Oh, OK. Accessing the GUI only from the GUI thread is (in my
experience) a pretty common requirement. I'm currently using WinForms
which requires that GUI elements be accessed from the thread that
created them, and IIRC Java Swing has the same limitation.
Kent
> It may be that the last time I tangled with the issue, I was missing some key
> docs. In any case, its a potential pitfall to watch out for.
>
> Cheers
>
> On Wednesday 21 October 2009 10:38, you wrote:
>> On Wed, Oct 21, 2009 at 10:43 AM, Chris Fuller
>>
>> <cfuller084 at thinkingplanet.net> wrote:
>> > on differences:
>> >
>> > The downloads include binaries, so there have to be distinct files for
>> > Linux and Windoze. If you download the same versions, there shouldn't be
>> > any noticeable differences, with one big exception: multithreading and
>> > PyGTK don't mix well on Windows. Your application might run perfectly
>> > (and look correct) on Linux, but in Windoze it's a mess.
>>
>> Wow. You can't make a multithreaded Windows GUI app using PyGTK? That
>> is a huge limitation - in my experience most large GUI programs do use
>> threads to allow the GUI to be responsive during long-running tasks.
>>
>> Kent
>
More information about the Tutor
mailing list