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


Groups > de.comp.lang.python > #4889

Re: [Python-de] strings zusammensetzen.

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Peter Otten <__peter__@web.de>
Newsgroups de.comp.lang.python
Subject Re: [Python-de] strings zusammensetzen.
Date Wed, 30 Aug 2017 21:24:46 +0200
Organization None
Lines 32
Message-ID <mailman.311.1504121168.2689.python-de@python.org> (permalink)
References <f09rraFsnvuU1@mid.individual.net> <mailman.225.1503650044.2689.python-de@python.org> <ytz1so08253.fsf@news.ole.ath.cx> <40c6ccec-4cbc-9614-dbdd-9e88cd1dccf0@gmx.de> <onrm39$2ck$1@blaine.gmane.org> <FBBAF2F3-FD7E-4E31-B76D-96CDB4B4199E@livinglogic.de> <mailman.288.1504021504.2689.python-de@python.org> <f0n0kkFt57tU1@mid.individual.net> <4247d63f-f9f9-2915-2cb8-8be9f4302564@behnel.de> <mailman.297.1504072132.2689.python-de@python.org> <f0n2reFtjk0U1@mid.individual.net> <f0nbdiFpmfU1@mid.individual.net> <f0ocuoF330oU1@mid.individual.net> <oo73dn$21k$1@blaine.gmane.org>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Trace news.uni-berlin.de s0CSRpzhbbzUF+aUaCGodQjwENfGXX+GYRMrCatCSimw==
Return-Path <gcpgg-python-de@m.gmane.org>
X-Original-To python-de@python.org
Delivered-To python-de@mail.python.org
X-Injected-Via-Gmane http://gmane.org/
User-Agent KNode/4.13.3
X-BeenThere python-de@python.org
X-Mailman-Version 2.1.24
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 <oo73dn$21k$1@blaine.gmane.org>
X-Mailman-Original-References <f09rraFsnvuU1@mid.individual.net> <mailman.225.1503650044.2689.python-de@python.org> <ytz1so08253.fsf@news.ole.ath.cx> <40c6ccec-4cbc-9614-dbdd-9e88cd1dccf0@gmx.de> <onrm39$2ck$1@blaine.gmane.org> <FBBAF2F3-FD7E-4E31-B76D-96CDB4B4199E@livinglogic.de> <mailman.288.1504021504.2689.python-de@python.org> <f0n0kkFt57tU1@mid.individual.net> <4247d63f-f9f9-2915-2cb8-8be9f4302564@behnel.de> <mailman.297.1504072132.2689.python-de@python.org> <f0n2reFtjk0U1@mid.individual.net> <f0nbdiFpmfU1@mid.individual.net> <f0ocuoF330oU1@mid.individual.net>
Xref csiph.com de.comp.lang.python:4889

Show key headers only | View raw


Hermann Riemann wrote:

> Am 30.08.2017 um 10:30 schrieb Peter Heitzer:
> 
>>>     der wegen des Lernaufwandes und Manual Suchens
>>>     lieber  os.system("rm "+dateiname)
>>>     als os.unlink(dateiname) verwendet.
>> os.unlink() dürfte aber portabler sein und auch mit Leerzeichen und
>> anderen speziellen Zeichen in dateiname zurechtkommen. Wer weiss, was
>> die Shell so treibt.
> 
> Bei Risisko halt:
> os.system('rm "'+dateiname+'"')

Das nützt nix. Sobald Dritte den Dateinamen bestimmen können, bekommst du 
Probleme:

$ cat demo.py
import glob
import os

for filename in os.listdir():
    if not filename.endswith(".py"):
        print("removing", repr(filename))
        os.system("rm '" + filename + "'")
$ touch foo\'\ -f\;echo\ \'oops
$ python3 demo.py
removing "foo' -f;echo 'oops"
oops
$ 

Back to de.comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

strings zusammensetzen. Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-08-25 07:45 +0200
  Re: [Python-de] strings zusammensetzen. Mike Müller <mmueller@python-academy.de> - 2017-08-25 08:00 +0200
  Re: [Python-de] strings zusammensetzen. Stefan Behnel <python-de@behnel.de> - 2017-08-25 08:05 +0200
  Re: [Python-de] strings zusammensetzen. Stefan Schwarzer <sschwarzer@sschwarzer.net> - 2017-08-25 09:08 +0200
  Re: [Python-de] strings zusammensetzen. "Tobias Herp" <tobias.herp@gmx.de> - 2017-08-25 10:28 +0200
    Re: [Python-de] strings zusammensetzen. ole-usenet-spam@gmx.net (Оlе Ѕtrеісhеr) - 2017-08-25 10:47 +0200
      Re: [Python-de] strings zusammensetzen. Tobias Herp <tobias.herp@gmx.de> - 2017-08-25 23:28 +0200
        Re: [Python-de] strings zusammensetzen. ole-usenet-spam@gmx.net (Оlе Ѕtrеісhеr) - 2017-08-26 10:30 +0200
      Re: [Python-de] strings zusammensetzen. Peter Otten <__peter__@web.de> - 2017-08-26 13:29 +0200
      Re: [Python-de] strings zusammensetzen. "Walter Dörwald" <walter@livinglogic.de> - 2017-08-29 17:21 +0200
        Re: [Python-de] strings zusammensetzen. Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-08-30 07:26 +0200
          Re: [Python-de] strings zusammensetzen. Stefan Behnel <python-de@behnel.de> - 2017-08-30 07:48 +0200
            Re: [Python-de] strings zusammensetzen. Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-08-30 08:04 +0200
              Re: [Python-de] strings zusammensetzen. ole-usenet-spam@gmx.net (Оlе Ѕtrеісhеr) - 2017-08-30 08:23 +0200
                Re: [Python-de] strings zusammensetzen. Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-08-30 09:37 +0200
                Re: [Python-de] strings zusammensetzen. Peter Otten <__peter__@web.de> - 2017-08-30 10:23 +0200
                Re: [Python-de] strings zusammensetzen. Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-08-30 20:00 +0200
              Re: [Python-de] strings zusammensetzen. "Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de> - 2017-08-30 08:30 +0000
                Re: [Python-de] strings zusammensetzen. Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-08-30 20:03 +0200
                Re: [Python-de] strings zusammensetzen. Thomas Orgelmacher <trash@odbs.org> - 2017-08-30 20:21 +0200
                Re: [Python-de] strings zusammensetzen. Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-08-31 14:31 +0200
                Re: [Python-de] strings zusammensetzen. Thomas Orgelmacher <trash@odbs.org> - 2017-08-31 19:26 +0200
                Re: [Python-de] strings zusammensetzen. Peter Otten <__peter__@web.de> - 2017-08-30 21:24 +0200
                Re: [Python-de] strings zusammensetzen. Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-08-31 14:40 +0200
                Re: [Python-de] strings zusammensetzen. Peter Otten <__peter__@web.de> - 2017-08-31 15:26 +0200
                Re: [Python-de] strings zusammensetzen. "Peter J. Holzer" <hjp-usenet3@hjp.at> - 2017-09-16 09:45 +0200
                Re: [Python-de] strings zusammensetzen. Thomas Orgelmacher <trash@odbs.org> - 2017-08-31 19:11 +0200
                Re: [Python-de] strings zusammensetzen. Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-09-01 09:12 +0200
                Re: [Python-de] strings zusammensetzen. Thomas Orgelmacher <trash@odbs.org> - 2017-09-01 21:06 +0200
                Re: [Python-de] strings zusammensetzen. Stefan Behnel <python-de@behnel.de> - 2017-09-01 21:43 +0200
                Re: [Python-de] strings zusammensetzen. Arnold Krille <arnold@arnoldarts.de> - 2017-09-02 15:23 +0200
          Re: [Python-de] strings zusammensetzen. "Walter Dörwald" <walter@livinglogic.de> - 2017-08-30 11:53 +0200
          Re: [Python-de] strings zusammensetzen. Mike Müller <mmueller@python-academy.de> - 2017-08-30 16:14 +0200
  Re: [Python-de] strings zusammensetzen. Mike Müller <mmueller@python-academy.de> - 2017-08-25 11:18 +0200
  Re: [Python-de] strings zusammensetzen. Stefan Schwarzer <sschwarzer@sschwarzer.net> - 2017-08-25 12:40 +0200
  Re: [Python-de] strings zusammensetzen. Tobias Herp <tobias.herp@gmx.de> - 2017-08-25 23:41 +0200
  Re: [Python-de] strings zusammensetzen. "Dr. Volker Jaenisch" <volker.jaenisch@inqbus.de> - 2017-08-26 02:34 +0200
  Re: strings zusammensetzen. Thomas Orgelmacher <trash@odbs.org> - 2017-08-29 19:05 +0200
    Re: strings zusammensetzen. ole-usenet-spam@gmx.net (Оlе Ѕtrеісhеr) - 2017-08-30 08:32 +0200
    Re: strings zusammensetzen. "Peter J. Holzer" <hjp-usenet3@hjp.at> - 2017-09-16 09:28 +0200
      Re: [Python-de] strings zusammensetzen. Stefan Behnel <python-de@behnel.de> - 2017-09-16 10:33 +0200
        Re: [Python-de] strings zusammensetzen. "Peter J. Holzer" <hjp-usenet3@hjp.at> - 2017-09-16 22:46 +0200
          Re: [Python-de] strings zusammensetzen. Stefan Behnel <python-de@behnel.de> - 2017-09-17 08:19 +0200
            Re: [Python-de] strings zusammensetzen. "Peter J. Holzer" <hjp-usenet3@hjp.at> - 2017-09-17 12:34 +0200
          Re: [Python-de] strings zusammensetzen. ole-usenet-spam@gmx.net (Оlе Ѕtrеісhеr) - 2017-09-17 10:50 +0200
            Re: [Python-de] strings zusammensetzen. Stefan Behnel <python-de@behnel.de> - 2017-09-17 11:14 +0200
            Re: [Python-de] strings zusammensetzen. "Peter J. Holzer" <hjp-usenet3@hjp.at> - 2017-09-17 14:19 +0200
      Re: strings zusammensetzen. Hermann Riemann <nospam.ng@hermann-riemann.de> - 2017-09-16 16:19 +0200
        Re: [Python-de] strings zusammensetzen. Stefan Behnel <python-de@behnel.de> - 2017-09-16 17:30 +0200

csiph-web