title: Python multiprocessing on Python 2.6 Win32 (xp)
body: <p>I tried to copy this example from this Multiprocessing lecture by jesse noller (as recommended in another SO post)[<a href="http://pycon.blip.tv/file/1947354?filename=Pycon-IntroductionToMultiprocessingInPython630.mp4]" rel="nofollow noreferrer">http://pycon.blip.tv/file/1947354?filename=Pycon-IntroductionToMultiprocessingInPython630.mp4]</a></p>
  
  <p>But for some reason I'm getting an error, as though it's ignoring my function definitions:
  I'm on Windows XP (win32) <strong>which I know has restrictions with regards to the multiprocessing library in 2.6 that requires everything be pickleable</strong></p>
  
  <pre><code>from multiprocessing import Process
  import time
  
  def sleeper(wait):
      print 'Sleeping for %d seconds' % (wait,)
      time.sleep(wait)
      print 'Sleeping complete'
  
  def doIT():    
      p = Process(target=sleeper, args=(9,))
      p.start()
      time.sleep(5)
      p.join()
  
  if __name__ == '__main__':
      doIT()
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Evaluating mypikklez.py
  Traceback (most recent call last):
    File "&lt;string&gt;", line 1, in &lt;module&gt;
    File "C:\Python26\lib\multiprocessing\forking.py", line 342, in main
      self = load(from_parent)
    File "C:\Python26\lib\pickle.py", line 1370, in load
      return Unpickler(file).load()
    File "C:\Python26\lib\pickle.py", line 858, in load
      dispatch[key](self)
    File "C:\Python26\lib\pickle.py", line 1090, in load_global
      klass = self.find_class(module, name)
    File "C:\Python26\lib\pickle.py", line 1126, in find_class
      klass = getattr(mod, name)
  AttributeError: 'module' object has no attribute 'sleeper'
  </code></pre>
  
  <p>The error causing the issue is :   AttributeError: 'module' object has no attribute 'sleeper'</p>
  
  <p>As simple of a function as it is I can't understand what would be the hold up.</p>
  
  <p>This is just for self-teaching purposes of basic concepts. I'm not trying to pre-optimize any real world issue.</p>
  
  <p>Thanks.</p>