[issue7680] pythonw crash while attempting to start() a thread object
dontbugme
report at bugs.python.org
Tue Jan 12 17:39:00 CET 2010
dontbugme <pythonbugsbugmenot at spamavert.com> added the comment:
I did not understand the question.
If you were meaning running a plain print(), then it does work:
#!/usr/bin/env python
print "foo"
IDLE 2.6.4 ==== No Subprocess ====
>>>
foo
>>>
Well, as you suggested the problem most probably originates from calling print from within a thread.
This code works as it should:
#!/usr/bin/env python
import threading
class MyThread (threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
f = open('I am alive', 'w')
f.write('hello, dude!\n')
f.close()
t = MyThread()
t.start()
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7680>
_______________________________________
More information about the Python-bugs-list
mailing list