Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.python > #4798
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Reimar Bauer <rb.proj@gmail.com> |
| Newsgroups | de.comp.lang.python |
| Subject | Re: [Python-de] os.system und os.popen |
| Date | Thu, 25 May 2017 23:30:24 +0200 |
| Lines | 45 |
| Message-ID | <mailman.9.1495747827.13056.python-de@python.org> (permalink) |
| References | <c19f4a3f-fcf3-185a-574b-27e7cbeb56aa@fam-goebel.de> <mailman.46.1495726174.8815.python-de@python.org> <eooc7gFaul8U1@mid.individual.net> <5d4200a7-d838-9135-8aba-17bc4fe8a036@mail.de> <5d880bc4-41ef-5566-2f8e-17a7a447b23e@sschwarzer.net> <CADfaKO8Nw3eOByo5HpQeh17R8RNMLDoYJfUpZWiEzyrrsiRjBw@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | news.uni-berlin.de Ybj8Xs4QybVgysIP/wBFnAv0CnFlZBBsa0JI4hW9nvsw== |
| Return-Path | <rb.proj@gmail.com> |
| X-Original-To | python-de@python.org |
| Delivered-To | python-de@mail.python.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=2avCvcPOb3k4n4dU1qsu7xgUn651QGGCOOHbtpyTMPg=; b=tfOp6NS4u095EHyn7o047Xe+tecfNMow6o6sjXgpWDETzZ6fiATzEuh7V5GRik14Wg ClRmVG/7/f0ZHO511YDkLzq9PCp60g28HSx1bWyJu6TXmLS4lcdfdGGyT2ntttoANCW+ /jDWkkbSWyI/hg1Zl4wBsmyaFjKU71QSKqoAZT9KaHBJiycMw9f63ksP70k6PCeynt0Z t6PHARDp+f/vNN9yXliKgVy/xUvJSYhi1O8UnuaNKGjXQb9CJpBaOQ9wLdhCQninRwS9 xr7twMks68386GY2hlhTxipNAeLtxXHLV8irlPDdYo+8bm5xjT3rxFHA5qbMVlS4CUL+ GE/w== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=2avCvcPOb3k4n4dU1qsu7xgUn651QGGCOOHbtpyTMPg=; b=LZgNR618iG+S3hKmDExwyN0wJz2LKF0/MEBbgc81z2aVUuNTKMz4T4ll9CrOB0Y5BI JN5P4cpNPQuVSAe1X7iAmGZfa/krlVBX7UQ3q6wYFXeweR/+mDuXGXLWB1cTb9vZpcoL EZDMFeo2tkOvKotFFFH95EgwPqhAX01l534cXUlXn4JJeSzg4diPt7jaZz0gBPREZFI8 tz8COUrNZ/KgrlHXLkh9uZnLiyHFC8jB04Y+k7XOkZLisG6XuY5XEVGwqsoyaaByCJvG x/Ep/+Fu8VoC2lnUQeabzgidt2RIeqbJdBRtIZzdAVLuOWfhQNNq51lg8ewH12od3BtG E7Dw== |
| X-Gm-Message-State | AODbwcBGzUh0yfUa3y++cirlywmuyqCxiF+HJ+va7a0yFED/6YX8nAw4 nSK8rDioC+MOqTxcwXxb0n0gzZ33/L/lNXI= |
| X-Received | by 10.28.140.133 with SMTP id o127mr10460492wmd.7.1495747825843; Thu, 25 May 2017 14:30:25 -0700 (PDT) |
| In-Reply-To | <5d880bc4-41ef-5566-2f8e-17a7a447b23e@sschwarzer.net> |
| X-Content-Filtered-By | Mailman/MimeDel 2.1.23 |
| X-BeenThere | python-de@python.org |
| X-Mailman-Version | 2.1.23 |
| Precedence | list |
| List-Id | Die Deutsche Python Mailingliste <python-de.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-de>, <mailto:python-de-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-de/> |
| List-Post | <mailto:python-de@python.org> |
| List-Help | <mailto:python-de-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-de>, <mailto:python-de-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <CADfaKO8Nw3eOByo5HpQeh17R8RNMLDoYJfUpZWiEzyrrsiRjBw@mail.gmail.com> |
| X-Mailman-Original-References | <c19f4a3f-fcf3-185a-574b-27e7cbeb56aa@fam-goebel.de> <mailman.46.1495726174.8815.python-de@python.org> <eooc7gFaul8U1@mid.individual.net> <5d4200a7-d838-9135-8aba-17bc4fe8a036@mail.de> <5d880bc4-41ef-5566-2f8e-17a7a447b23e@sschwarzer.net> |
| Xref | csiph.com de.comp.lang.python:4798 |
Show key headers only | View raw
Ich hab letztens noch EasyProcess kennen gelernt.
https://pypi.python.org/pypi/EasyProcess
Viele Grüße
Reimar
2017-05-25 20:01 GMT+02:00 Stefan Schwarzer <sschwarzer@sschwarzer.net>:
> On 2017-05-25 19:06, Sven R. Kunze wrote:> On 25.05.2017 17:40, Hermann
> Riemann wrote:
> >> error=os.system("latex ... 2> /tmp/log")
> >>
> >> Hermann
> >> der das so machen würde
> >>
> >
> > Sieht durchaus einfacher aus, ist aber nicht ganz unsicher, wenn's um
> > das Thema Quoting von Parametern geht.
> >
> > *Hier auch noch zum Nachlesen:*
> > https://docs.python.org/3.6/library/subprocess.html
>
> `subprocess` ist nicht nur sicherer, sondern auch ganz
> allgemein robuster.
>
> Es wird zwar immer hervorgehoben, dass mit dem Modul keine
> Angriffe mit speziellen Dateinamen möglich sind (was stimmt),
> aber das Modul hilft auch, wenn zum Beispiel Dateinamen ganz
> ohne böse Absicht Leerzeichen enthalten oder Zeichen, die
> sonst von der Shell interpretiert werden würden.
>
> Beispiel:
>
> dateiname = "dies & das.txt" # von irgendwoher
>
> ausgabe = subprocess.check_output(["du", "--human-readable",
> "--summarize", dateiname])
>
> Viele Grüße
> Stefan
> _______________________________________________
> python-de maillist - python-de@python.org
> https://mail.python.org/mailman/listinfo/python-de
>
Back to de.comp.lang.python | Previous | Next — Previous in thread | Find similar
[Python-de] os.system und os.popen Ulrich Goebel <ml@fam-goebel.de> - 2017-05-25 17:19 +0200
Re: [Python-de] os.system und os.popen Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-05-25 17:40 +0200
Re: [Python-de] os.system und os.popen "Sven R. Kunze" <srkunze@mail.de> - 2017-05-25 19:06 +0200
Re: [Python-de] os.system und os.popen Stefan Schwarzer <sschwarzer@sschwarzer.net> - 2017-05-25 20:01 +0200
Re: [Python-de] os.system und os.popen Reimar Bauer <rb.proj@gmail.com> - 2017-05-25 23:30 +0200
csiph-web