Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5571 > unrolled thread

Re: portable multiprocessing code

Started byBenjamin Kaplan <benjamin.kaplan@case.edu>
First post2011-05-17 08:49 -0700
Last post2011-05-17 08:49 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: portable multiprocessing code Benjamin Kaplan <benjamin.kaplan@case.edu> - 2011-05-17 08:49 -0700

#5571 — Re: portable multiprocessing code

FromBenjamin Kaplan <benjamin.kaplan@case.edu>
Date2011-05-17 08:49 -0700
SubjectRe: portable multiprocessing code
Message-ID<mailman.1675.1305647357.9059.python-list@python.org>
On Tue, May 17, 2011 at 8:14 AM, Eric Frederich
<eric.frederich@gmail.com> wrote:
> I have written some code using Python 2.7 but I'd like these scripts
> to be able to run on Red Hat 5's 2.4.3 version of Python which doesn't
> have multiprocessing.
> I can try to import multiprocessing and set a flag as to whether it is
> available.  Then I can create a Queue.Queue instead of a
> multiprocessing.Queue for the arg_queue and result_queue.
> Without actually trying this yet it seems like things would work okay
> except for the Worker class.  It seems I can conditionally replace
> multiprocessing.Queue with Queue.Queue, but is there anything to
> replace multiprocessing.Process with?
>
> Are there any best practices for doing something like this?
> Below is a dumb example that just counts lines in files.
> What would be the best way to make this runnable in older (2.4.3)
> versions of Python?
>

http://pypi.python.org/pypi/multiprocessing

Also, you may be able to find the processing package (what
multiprocessing was called back when it was 3rd party) in your package
manager.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web