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


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

Re: concatenate function

Started byChris Rebert <clp2@rebertia.com>
First post2012-03-13 13:40 -0700
Last post2012-03-13 13:40 -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: concatenate function Chris Rebert <clp2@rebertia.com> - 2012-03-13 13:40 -0700

#21582 — Re: concatenate function

FromChris Rebert <clp2@rebertia.com>
Date2012-03-13 13:40 -0700
SubjectRe: concatenate function
Message-ID<mailman.627.1331671249.3037.python-list@python.org>
On Tue, Mar 13, 2012 at 1:35 PM, Robert Kern <robert.kern@gmail.com> 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 you
>>> 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):
>>   File "/home6/psloliveira/ferreirafm/bin/no_name.py", line 73, in<module>
>>     main()
>>   File "/home6/psloliveira/ferreirafm/bin/no_name.py", line 68, in main
>>     comb_slt(toplist)
>>   File "/home6/psloliveira/ferreirafm/bin/no_name.py", line 55, in
>> comb_slt
>>     subprocess.Popen([cmd, options], env=qsub_env)
>>   File "/share/apps/python/lib/python2.7/subprocess.py", line 679, in
>> __init__
>>     errread, errwrite)
>>   File "/share/apps/python/lib/python2.7/subprocess.py", line 1228, in
>> _execute_child
>>     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") and
> each individual argument must be a separate string in the list. You cannot
> combine them together with spaces. The reason you get a "Permission denied"
> 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) under
http://docs.python.org/library/subprocess.html#popen-constructor

Cheers,
Chris

[toc] | [standalone]


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


csiph-web