<div dir="ltr">Thanks Stephane,<div><br></div><div>If you mean you'd prefer to rely on the standard library (e.g. subprocess) over a third party dependency (like sh or plumbum or anything else), I understand that. We've been cautious about adding extra dependencies to Biopython, so it would have to be a compelling use case.</div><div><br></div><div><div>The Biopython Tutorial already uses subprocess heavily for all our examples piping stdin/stdout. Working out how to do this can be tricky, so the examples help. Piping this way generally works fine, but when something fails (e.g. a malformed input), it becomes harder to debug than using temporary intermediate files. I don't yet see any reason to change those examples using subprocess.</div><div><br></div><div>My point was subprocess does not help build up the command line - you must give it the command line string, or a list of arguments. Doing this "by hand" is fine for simple cases, and string templates or carefully constructed f-strings would cover most things elegantly.<br></div><div><br></div><div>Peter</div><div><br></div><div>P.S. I've opened an issue on GitHub as an easier long term way to track this discussion and any conclusions from it:<div><br></div><div><a href="https://github.com/biopython/biopython/issues/2877">https://github.com/biopython/biopython/issues/2877</a><br></div><div></div></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 11, 2020 at 8:50 PM Stéphane Téletchéa <<a href="mailto:stephane.teletchea@univ-nantes.fr">stephane.teletchea@univ-nantes.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear all,<br>
<br>
I was about to say the same, my preference for my own projects is always <br>
to try to rely on upstream development as much as possible, so <br>
subprocess it the recommandation.<br>
<br>
Concerning the pipes, isn't subprocess meant for that already?<br>
<br>
According to the doc (<a href="https://docs.python.org/3/library/subprocess.html" rel="noreferrer" target="_blank">https://docs.python.org/3/library/subprocess.html</a>) <br>
and some answers in stack overflow <br>
(<a href="https://stackoverflow.com/questions/13332268/how-to-use-subprocess-command-with-pipes" rel="noreferrer" target="_blank">https://stackoverflow.com/questions/13332268/how-to-use-subprocess-command-with-pipes</a>), <br>
it should.<br>
<br>
Would you have some examples so we can try what is problematic (one/two <br>
basic cases)?<br>
<br>
And yes, thanks for asking for comments :-)<br>
<br>
Stéphane<br>
<br>
Le 10/05/2020 à 19:09, Peter Cock a écrit :<br>
> Yes, subprocess is very powerful but tricky.<br>
><br>
> Sadly it doesn't help with giving a nice syntax for building command <br>
> lines, which for me was the main thing our Bio.Application framework <br>
> added. Perhaps someone else on the list will have a good suggestion.<br>
><br>
> Peter<br>
<br>
-- <br>
Assistant Professor, UFIP, UMR 6286 CNRS, Team Protein Design In Silico<br>
UFR Sciences et Techniques, 2, rue de la Houssinière, Bât. 25, 44322 Nantes cedex 03, France<br>
Tél : +33 251 125 636 / Fax : +33 251 125 632<br>
<a href="http://www.ufip.univ-nantes.fr/" rel="noreferrer" target="_blank">http://www.ufip.univ-nantes.fr/</a> - <a href="http://www.steletch.org" rel="noreferrer" target="_blank">http://www.steletch.org</a><br>
<br>
_______________________________________________<br>
Biopython mailing list  -  <a href="mailto:Biopython@mailman.open-bio.org" target="_blank">Biopython@mailman.open-bio.org</a><br>
<a href="https://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">https://mailman.open-bio.org/mailman/listinfo/biopython</a></blockquote></div>