Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'main()': 0.05; 'expected.': 0.09; 'output': 0.10; 'argument': 0.15; 'skip:" 40': 0.15; '...]': 0.16; '55,': 0.16; '[errno': 0.16; '__init__': 0.16; 'errread,': 0.16; 'kern': 0.16; 'obviously,': 0.16; 'oserror:': 0.16; 'program."': 0.16; 'stdout:': 0.16; 'subject:function': 0.16; 'cc:addr:python-list': 0.16; 'this:': 0.16; 'wrote:': 0.18; '>>>': 0.18; 'seems': 0.20; 'cheers,': 0.20; '(most': 0.21; 'cc:no real name:2**0': 0.21; 'wrote': 0.21; 'header:In-Reply-To:1': 0.22; 'string': 0.24; 'command': 0.24; 'traceback': 0.24; 'received:209.85.220': 0.25; 'cc:2**0': 0.26; 'code': 0.26; 'tried': 0.27; 'not.': 0.28; 'raise': 0.28; 'separate': 0.28; 'permission': 0.28; 'second': 0.28; 'message-id:@mail.gmail.com': 0.29; "skip:' 30": 0.29; 'cc:addr:python.org': 0.29; 'pm,': 0.29; '(and': 0.30; 'chris': 0.30; 'error': 0.30; 'url:library': 0.31; 'tue,': 0.32; 'idea': 0.32; 'list': 0.32; 'named': 0.33; 'file': 0.34; 'denied': 0.34; 'executable': 0.34; 'last):': 0.34; 'list.': 0.35; 'url:python': 0.35; 'run': 0.37; 'received:google.com': 0.37; 'skip:" 10': 0.37; 'skip:_ 10': 0.38; 'received:209.85': 0.38; 'could': 0.38; 'should': 0.38; 'url:org': 0.39; 'goes': 0.39; 'received:209': 0.39; 'cannot': 0.39; 'here:': 0.67; 'sender:addr:chris': 0.84; 'spaces.': 0.84; 'to:none': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:cc:content-type :content-transfer-encoding; bh=s+MCEn1C6ucbRJTrQKKId5dMphbwrqn7XHtVzlg/YTQ=; b=NiR2tK1pcW3PMp0e7olrIkTmHgLawTFWjD6O91GMlRT5jdbJM4WfVbwxz8U8XNQXYH Nktmvn0PhoS+C/r5h9G6OGjK4n0QBVkb+ZHE/LP/iERjbV04Y03m3OmQJ8LHfccr0fXr 1qNKf1ynJiJqOv1kELPyups/TUHa/PFagFdp4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=s+MCEn1C6ucbRJTrQKKId5dMphbwrqn7XHtVzlg/YTQ=; b=Om2iaAxn2WsBTGXj/koeVwl7GAjf2VhAhS+dnjsrfcGpkqLG4zJtf2BLl9BWogEit2 GZ5mT7G2BVZjSlmdQcN0dNq7lvCgfMMtWye6jubG5j7uEgMxTt+O2DNZXuZafYjJLwey hMpZBywE1cw09+XPPszRnofxY8Qmh1F+62n8/DA1yaZsvazKxgT1t6bqWnnFQgFRzF2v 0kG8Aq6u3sE34vS5EgjQvzwOJEaUk13LPsmKEUm+gKjW+MjlVyCFThUKBr34F5w1dbFy DJUT9jrQtm6VUXR+/tOEwXYzfQC3vbf3LqkKSGeMsQAZoSRBAYJjsVB4IpFrET6KWbHV X88Q== MIME-Version: 1.0 Sender: chris@rebertia.com In-Reply-To: References: <1331649332216-4574176.post@n6.nabble.com> <1331654366771-4574496.post@n6.nabble.com> <1331661704724-4574967.post@n6.nabble.com> Date: Tue, 13 Mar 2012 13:40:40 -0700 X-Google-Sender-Auth: _IrlXe-XsQTsAV0_m0w58Nr0iGU Subject: Re: concatenate function From: Chris Rebert Cc: python-list@python.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQnPGfpn4CC7yS8FgBMvafvUDE+v8IGKGuPRj1G143PdTOwOZbT+jmbLW2K2i3Sl3C/gCchm X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 59 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1331671249 news.xs4all.nl 6853 [2001:888:2000:d::a6]:33165 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21582 On Tue, Mar 13, 2012 at 1:35 PM, Robert Kern wrote: > On 3/13/12 6:01 PM, ferreirafm wrote: >> Robert Kern-2 wrote >>> When you report a problem, you should copy-and-paste the output that yo= u >>> got and >>> also state the output that you expected. I have no idea what you mean >>> when >>> you >>> say "subprocess.Popen seems not accept to run "qsub" over a second >>> program." >>> >> >> Code goes here: >> http://ompldr.org/vZDB5YQ >> >> stdout: >> $ no_name.py --toplist top_percent.list >> Traceback (most recent call last): >> =C2=A0 File "/home6/psloliveira/ferreirafm/bin/no_name.py", line 73, in<= module> >> =C2=A0 =C2=A0 main() >> =C2=A0 File "/home6/psloliveira/ferreirafm/bin/no_name.py", line 68, in = main >> =C2=A0 =C2=A0 comb_slt(toplist) >> =C2=A0 File "/home6/psloliveira/ferreirafm/bin/no_name.py", line 55, in >> comb_slt >> =C2=A0 =C2=A0 subprocess.Popen([cmd, options], env=3Dqsub_env) >> =C2=A0 File "/share/apps/python/lib/python2.7/subprocess.py", line 679, = in >> __init__ >> =C2=A0 =C2=A0 errread, errwrite) >> =C2=A0 File "/share/apps/python/lib/python2.7/subprocess.py", line 1228,= in >> _execute_child >> =C2=A0 =C2=A0 raise child_exception >> OSError: [Errno 13] Permission denied > > > You need to use a command list like this: > > ['qsub', 'combine_silent.linuxgccrelease', '-database', > '/home6/psloliveira/rosetta_database/', ...] > > The program to run ("qsub", not "qsub combine_silent.linuxgccrelease") an= d > each individual argument must be a separate string in the list. You canno= t > combine them together with spaces. The reason you get a "Permission denie= d" > error is that it tried to find an executable file named "qsub > combine_silent.linuxgccrelease" and, obviously, could not. See also the first "Note" box (and the description of "args" generally) und= er http://docs.python.org/library/subprocess.html#popen-constructor Cheers, Chris