Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'output': 0.04; 'option,': 0.07; 'python': 0.09; 'subject:core': 0.16; 'subject:submit': 0.16; 'task.': 0.16; 'script.': 0.17; '>>>': 0.18; 'input': 0.18; 'sender:addr:gmail.com': 0.18; 'module': 0.19; 'received:209.85.214.174': 0.21; '3.2': 0.22; 'script': 0.24; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'agreed.': 0.29; 'subject:jobs': 0.29; 'file': 0.32; 'could': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'list': 0.35; 'faster': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'uses': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'jobs': 0.65; 'computers': 0.69; 'suited': 0.71; 'to:name:python': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=9CneMbFCiVv3+FcL6msukrP2ZnIIP5HTuBdIBzU9YIg=; b=ViculodUEjF9QFIRqB9HXqhFBRLo64RVFM2zB2UM7XCoaoV6mPIR/3QIHFvb4gXgsi wVZD4Z0dEzsjZ1vPwAKdc6AxsmNEPjfL5lcSC9uHpkfFjXzdIaTvSbpRDrPSzZGEMX1d RrvVYDhZKLVljtbPE/00/jflTdECHSKWHuen9kB5uwFL0fAXbgfiWPU3AH6L1HCiskMR BSVX7pwCVvTi+JFOYRfF1JRZwIiBP2ap8GxpAbmM3Ar0xisTePMKxCdsf3wjxawBMg3p kWGK+IpFLmOArLCrpvi4cAtNlCFVro+I1xb2JYkgE6ZjDWivUpu+Od2p6SjrSzkShoLp Ue7w== MIME-Version: 1.0 Sender: jsf80238@gmail.com In-Reply-To: References: <504ED1EB.1080008@shopzeus.com> Date: Wed, 12 Sep 2012 19:59:09 -0600 X-Google-Sender-Auth: 0vETK76DdsoaEZK7ojoA4xTCqwo Subject: Re: submit jobs on multi-core From: Jason Friedman To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1347501552 news.xs4all.nl 6864 [2001:888:2000:d::a6]:46905 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:29008 >>> I have a python script in which I have a list of files to input one by one >>> and for each file I get a number as an output. >>> I used for loop to submit the file to script. >>> My script uses one file at a time and returns the output. >>> >>> My computers has 8 cores. >>> Is there any way that I could submit 8 jobs at a time and get all the >>> output faster ? >> > Or if Python 3.2 is an option, the concurrent.futures module would be > very well suited for this task. Agreed.