Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 17 Online
OpenStudy (anonymous):

On PS5, when I try to run the code if __name__ == '__main__': p = Popup() thread.start_new_thread(main_thread, (p,)) p.start() I get a termination on the start_new_thread() statement. Popup() creation seems to be fine. Traceback is to recolorize_main in ColorDelegator -- ValueError -- need more than 1 value to unpack. Running Windows 7

OpenStudy (rsmith6559):

This is why an interpreted language can be a lot easier than a compiled one. Copy and paste one line at a time into the Python shell, and see where it barfs.

OpenStudy (anonymous):

definitely crashes on thread.start_new_thread(main_thread, (p,)) The libraries for 2.5.4 are from 2008. Maybe thinking I should upgrade to later version.

OpenStudy (rsmith6559):

TBH, without an idea of what the main_thread() function does, I don't have a clue. Since main_thread is a "normal" function, not doing anything thread special, what happens if you call it with arg p directly?

OpenStudy (anonymous):

That was interesting -- when I called it, it apparently did what it was supposed to -- popped-up a bunch of windows. Thanks -- that's a great clue.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!