importing target functions | multiprocessing
Question: I want to learn multiprocessing in python. I started reading
<http://www.doughellmann.com/PyMOTW/multiprocessing/basics.html> and I am not
able to understand the section on importing target functions.

In particular what does the following sentence mean..

"Wrapping the main part of the application in a check for __main__ ensures
that it is not run recursively in each child as the module is imported."

Can someone explain this in more detail with an example ?


Answer: <http://effbot.org/pyfaq/tutor-what-is-if-name-main-for.htm>

<http://docs.python.org/tutorial/modules.html#executing-modules-as-scripts>

[What does <if __name__=="__main__":>
do?](http://stackoverflow.com/questions/419163/what-does-if-name-main-do)

<http://en.wikipedia.org/wiki/Main_function#Python>

