calling functions across threads
steven.bethard at gmail.com
Wed Dec 29 19:55:26 CET 2004
Thomas Rast wrote:
> Steven Bethard <steven.bethard at gmail.com> writes:
>>I get the correct output, but if you run this yourself, you'll see
>>that the numbers 1 through 10 aren't printed in sync with the writes
>>(i.e. every half second); they're all printed at the end. Could
>>someone explain to me why this happens, and how (if possible) I can
>>get the numbers printed in sync with the appends to the list?
> I tried your code, and got the expected behaviour, i.e. the numbers
> are printed every half second. Maybe you have a buffering problem?
> $ python2.4 -V
> Python 2.4
> $ uname -a
> Linux thomas 2.6.9 #6 Sun Dec 19 17:45:53 CET 2004 i686 GNU/Linux
FWIW, I'm using Python 2.4 on a Windows XP box. But it looks like my
problems were due to using PythonWin. When I tried the same code at the
command prompt python, it worked just fine.
Anyone know why PythonWin would do this? I originally ran into this
problem using simliar code in a module that I used with the Ellogon
(www.ellogon.org) framework. Maybe if I can solve the problem for
PythonWin, I can translate that into a solution for Ellogon too...
More information about the Python-list