Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.python > #4634
| Path | csiph.com!news.redatomik.org!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Hermann Riemann <nospam.gerct08@hermann-riemann.de> |
| Newsgroups | de.comp.lang.python |
| Subject | Re: Wie sieht Python fuer mich aus? |
| Date | Mon, 9 Jan 2017 19:02:25 +0100 |
| Lines | 28 |
| Message-ID | <edi1hhF5k59U1@mid.individual.net> (permalink) |
| References | <Python-20170108184230@ram.dialup.fu-berlin.de> <edgoguFq50gU1@mid.individual.net> <p9uckd-f0g.ln1@gate.homenet> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Trace | individual.net O92fiIage/0LI61ydZLWYQByRm8d29uJ9HjIGQ5UkQrxBtJLDZ |
| Cancel-Lock | sha1:yLijLC1GPIgX87AfE3HPhvQ5exM= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
| In-Reply-To | <p9uckd-f0g.ln1@gate.homenet> |
| Xref | csiph.com de.comp.lang.python:4634 |
Show key headers only | View raw
Am 09.01.2017 um 18:36 schrieb Thomas Orgelmacher:
>> Bei Editoren wie xemacs, emac und kate
>> habe ich die Voreinstellung ( wie auch bei C) auf 3 eingestellt.
> Das mit den vier Leerzeichen kommt hierher.
> https://www.python.org/dev/peps/pep-0008/
> Und eine einheitliche Verwendung ist sicher Sinnvoll.
Njein.
Man kann mit einem Python Programm die Zahl
führende Leerezeichen leicht umstellen.
f=open(dateiname)
lines=f.readlines()
f.close
f=open(dateiname,"w")
for line in lines:
z=line.lstrip()
f.write((len(line)-len(z))*neu_leerzeichen//alt_leerzeichen*' ')
f.write(z);
f.close()
Hermann
der das Programm nicht getestet hat.
--
http://www.hermann-riemann.de
Back to de.comp.lang.python | Previous | Next — Previous in thread | Find similar
Re: Wie sieht Python fuer mich aus? Hermann Riemann <nospam.gerct08@hermann-riemann.de> - 2017-01-09 07:22 +0100
Re: Wie sieht Python fuer mich aus? Thomas Orgelmacher <trash@odbs.org> - 2017-01-09 18:36 +0100
Re: Wie sieht Python fuer mich aus? Hermann Riemann <nospam.gerct08@hermann-riemann.de> - 2017-01-09 19:02 +0100
csiph-web