2

I'm wondering if it is possible to make stdout works with Parallel Python? It's really hard to debug without seeing any print-out.

For example, given the following code snippets:

import pp

def printit(s):
    print s

job_server = pp.Server()
for i in xrange(100):
    job_server.submit(printit, (i,))
job_server.wait()

There is not any print out. Any ideas?

1 Answer 1

1

Look into using the logging module. Set up your "parent" program to listen on a network port, and have your "jobs" send debug info (using logging) to that port. An example of how to set this up is given here: http://docs.python.org/2/howto/logging-cookbook.html#sending-and-receiving-logging-events-across-a-network

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. The similar answer was mentioned in stackoverflow.com/questions/15096090/….

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.