HELP! How to return the returned value from a threaded function

D. Xenakis gouzounakis at hotmail.com
Sat Apr 18 19:07:03 CEST 2015


Maybe this is pretty simple but seems I am stuck...

def message_function():
    return "HelloWorld!"


def thread_maker():
    """
    call message_function()
    using a new thread
    and return it's "HelloWorld!"
    """
    pass


Could someone please complete above script so that:

thread_maker() == "HelloWorld!"

Please import the library you suggest too.
I tried threading but I could not make it work.

THX!



More information about the Python-list mailing list