title: Why multiprocessing.Pool gives so strange error in python?
body: <p>Please give an advice, what to do. Can't understand what is going on. I want to run simple test script using multiprocessing.Pool in python.</p>
  
  <p>I am running on windows, python 2.7</p>
  
  <p>When i start my script, i see errors, that never end. I can't get what is going on. I copied a part of my big list:</p>
  
  <pre><code>    prepare(preparation_data)
    File "C:\Python27\lib\multiprocessing\forking.py", line 488, in prepare
  Traceback (most recent call last):
    File "&lt;string&gt;", line 1, in &lt;module&gt;
    File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
      assert main_name not in sys.modules, main_name
  AssertionError: thread
  prepare(preparation_data)
    File "C:\Python27\lib\multiprocessing\forking.py", line 488, in prepare
        File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
      Traceback (most recent call last):
    File "&lt;string&gt;", line 1, in &lt;module&gt;
  Traceback (most recent call last):
    File "&lt;string&gt;", line 1, in &lt;module&gt;
    File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
    File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
  assert main_name not in sys.modules, main_name
      assert main_name not in sys.modules, main_name
  Traceback (most recent call last):
          AssertionErrorprepare(preparation_data)
  AssertionError  File "&lt;string&gt;", line 1, in &lt;module&gt;
  prepare(preparation_data)
    File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
  :   File "C:\Python27\lib\multiprocessing\forking.py", line 488, in prepare
  : prepare(preparation_data)
    File "C:\Python27\lib\multiprocessing\forking.py", line 488, in prepare
  Traceback (most recent call last):
    File "&lt;string&gt;", line 1, in &lt;module&gt;
    File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
  t  File "C:\Python27\lib\multiprocessing\forking.py", line 488, in prepare
      t            hreadprepare(preparation_data)
  hreadassert main_name not in sys.modules, main_name
  prepare(preparation_data)
  assert main_name not in sys.modules, main_name
  
    File "C:\Python27\lib\multiprocessing\forking.py", line 488, in prepare
  
  AssertionError  File "C:\Python27\lib\multiprocessing\forking.py", line 488, in
  prepare
  AssertionError        :     : assert main_name not in sys.modules, main_name
  assert main_name not in sys.modules, main_name
  tassert main_name not in sys.modules, main_name
  tAssertionErrorAssertionErrorhreadAssertionErrorhread: :
  :
  tttTraceback (most recent call last):
    File "&lt;string&gt;", line 1, in &lt;module&gt;
  hreadhreadhread  File "C:\Python27\lib\multiprocessing\forking.py", line 380, in
   main
  </code></pre>
  
  <p>... and so on...</p>
  
  <p>My little code:</p>
  
  <pre><code>from multiprocessing import Pool
  
  def display(item):
      print 'item: ' + str(item)
  
  
  def main():
      items = []
      for i in range(0, 999):
          items.append(i)
  
      pool = Pool(10)
      pool.map(display, items)
      pool.close()
      pool.join()
  
  if __name__ == '__main__':
      main()
  </code></pre>