title: Is it possible to use multiprocessing in a module with windows?
body: <p>I'm currently going through some pre-existing code with the goal of speeding it up. There's a few places that are extremely good candidates for parallelization. Since Python has the GIL, I thought I'd use the multiprocess module. </p>
  
  <p>However from my understanding the only way this will work on windows is if I call the function that needs multiple processes from the highest-level script with the <code>if __name__=='__main__'</code>  safeguard. However, this particular program was meant to be distributed and imported as a module, so it'd be kind of clunky to have the user copy and paste that safeguard and is something I'd really like to avoid doing.</p>
  
  <p>Am I out of luck or misunderstanding something as far as multiprocessing goes? Or is there any other way to do it with Windows?</p>