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


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

Re: [Python-de] Datetime frage

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Hans-Peter Jansen <hpj@urpla.net>
Newsgroups de.comp.lang.python
Subject Re: [Python-de] Datetime frage
Date Mon, 12 Dec 2016 21:42:55 +0100
Lines 41
Message-ID <mailman.34.1481575384.2322.python-de@python.org> (permalink)
References <o2k666$fir$1@tota-refugium.de> <mailman.12.1481486471.2322.python-de@python.org> <o2mp1q$4ad$3@tota-refugium.de> <1747887.PsCaaSdKOV@xrated>
Mime-Version 1.0
Content-Type text/plain; charset="iso-8859-1"
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de z/+SwAuTXafvXHgls1T0CgG+6IlkHJ29fMo9gwI/8Cvw==
Return-Path <hpj@urpla.net>
X-Original-To python-de@python.org
Delivered-To python-de@mail.python.org
X-Virus-Scanned amavisd-new at lisa.loc
User-Agent KMail/4.14.10 (Linux/4.8.12-3-default; KDE/4.14.26; x86_64; ; )
In-Reply-To <o2mp1q$4ad$3@tota-refugium.de>
X-Provags-ID V03:K0:Vi/oY8HX2TQf8/o83qL+ZV1/1M+m6hLAj6PGLRnkBxhfbBCabRs I6yKVeGtBCwKmCXACUqofGPNgQJmoPYRfD+oJgKUwQYTz2P5fm7NUBWolOLMIcqV1RuicIF z64085r0faSN5UggNEXc1iGrkBZBj2nxW8XYlYZw/h4e0wtmUosYbzzxUJZCKiDTHL9fkM/ M1iGvM4Y9r6mys5smlzcA==
X-UI-Out-Filterresults notjunk:1;V01:K0:ocHxv5/h534=:UJkB9gSf/deH0IQEdVqvCl B3sQDhTxINWw5Hx4Ys7p6u3wldsBAdCLc6Ignt4C0bl6egt1aQch7TuRBQXSQshQu0H8rnX8h FFG3ng70nZnsbB6gI8Phl89VlXHRnyrBAwzsOk58mH5Ur8pVGHlLfht/FIL6idcGKSct6IV2Z 7MFirB68MfWM9h2SY7LKgI+81VTqEP3Lc/w/MHFLKN/fWW/zY/dDOkJhoNYakGAqsbB5l59SV 6Vxsyt6T5+7/epZjvMdtHcsk9TWFQXDQLF0DouGYqSxjrmcX/33m9+B9DvK3B1IFPAdy8fzRo p/3kAW+TLPDbfX3T9G2WiG1c3htXdalOo/KefoH6OlxXUR4ruDij3F3ADGm6YBpynnZm/ypg3 tF28Jjd/RCm8EI1HCA5awVj2wL4kNq9Yf3N8MmSvb56VjWO+xvPL9D1nimZX7AG3kIJYj3NHd afoZaL8TWmdEjVwgKOIFCwJOaWCZapWOZ0B+WF79WBANCAPnZKUH76pLgP5WWBQo08h2+4jhU KBeBn+C/tWK2AfN/+8RBu/jA/+PY15kWvryfR7fKOVHs5QZLf7H3hNe88gvf4SDXOFDjBD8jC nPCE7fdyAkLwnYANxj/Ljq61chgWQkLS2ecFUntyvHx8byl5nqCq4teehHJo8+iNHwCegR1nL 3y8yV4o9EPT5JUUVEuV1/H794+48gIR3glKx8peQTJcNFtIl4MlClVXB6oSxmY2PoUPH48IS+ yIRE30kraJysnvz0
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 <1747887.PsCaaSdKOV@xrated>
X-Mailman-Original-References <o2k666$fir$1@tota-refugium.de> <mailman.12.1481486471.2322.python-de@python.org> <o2mp1q$4ad$3@tota-refugium.de>
Xref csiph.com de.comp.lang.python:4609

Show key headers only | View raw


On Montag, 12. Dezember 2016 18:07:55 Manfred Gil wrote:
> Am Sun, 11 Dec 2016 21:01:01 +0100 schrieb Hans-Peter Jansen:
> > On Sonntag, 11. Dezember 2016 18:33:42 Manfred Gil wrote:
> > 
> > Aber wer will das schon... ;)
> > 
> > Viel Glück,
> > Pete
> 
> richtig ... wer will das.
> 
> wieso muß ich setlocale überhaupt setzen.

explizit ist besser als implizit... Schon mal versucht, einem Programm das auszutreiben, 
unbedingt eine Locale setzen zu wollen? Nicht witzig, wenn es, wie in diesem Thread 
zigfach erwähnt, einfach auf irgend einen Wert gesetzt wird. Tu das nicht! 

Ebenso eine Zwangslocale, wie von Dir implizit gefordert, ist keine so gute Idee. 
Manchmal will man vielleicht gar keine locale laden, und es gibt unterschiedliche Locale-
Systeme. Zum Bleistift findet es PyQt* nicht so gut, wenn man in diesen locales 
rumfummelt, da es ein eigenes Locale-System mitbringt, das sich auf die Oberfläche 
erstreckt, etc...pp.

> ich wollt eigendlich nur eine Deutsche ausgabe von strftime.
>
> Gruß Manfred
> 
> PS: wie ich schon schrieb klappt es, wenn ich  encoding mit angebe.

und wie ich schon schrieb, klappt es auch ganz OHNE Werte:

locale.setlocale(locale.LC_ALL, '')

und die Banane ist geschält!

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


Thread

Datetime frage Manfred Gil <manfred-gil@t-online.de> - 2016-12-11 18:33 +0000
  Re: [Python-de] Datetime frage "Andreas Jung" <lists@zopyx.com> - 2016-12-11 19:39 +0100
    Re: [Python-de] Datetime frage Manfred Gil <manfred-gil@t-online.de> - 2016-12-11 19:20 +0000
      Re: [Python-de] Datetime frage "Andreas Jung" <lists@zopyx.com> - 2016-12-11 20:29 +0100
        Re: [Python-de] Datetime frage Hans-Georg Joepgen <test@joepgen.com> - 2016-12-11 20:49 +0100
          Re: [Python-de] Datetime frage "Andreas Jung" <lists@zopyx.com> - 2016-12-11 20:56 +0100
      Re: [Python-de] Datetime frage Christopher Arndt <chris@chrisarndt.de> - 2016-12-11 20:53 +0100
      Re: [Python-de] Datetime frage Stefan Schwarzer <sschwarzer@sschwarzer.net> - 2016-12-11 21:03 +0100
        Re: [Python-de] Datetime frage Manfred Gil <manfred-gil@t-online.de> - 2016-12-12 18:01 +0000
          Re: [Python-de] Datetime frage Arnold Krille <arnold@arnoldarts.de> - 2016-12-12 21:04 +0100
      Re: [Python-de] Datetime frage Achim Herwig <python@wodca.de> - 2016-12-11 21:03 +0100
        Re: [Python-de] Datetime frage Manfred Gil <manfred-gil@t-online.de> - 2016-12-12 18:04 +0000
          Re: [Python-de] Datetime frage Achim Herwig <python@wodca.de> - 2016-12-12 20:50 +0100
  Re: [Python-de] Datetime frage Hans-Peter Jansen <hpj@urpla.net> - 2016-12-11 21:01 +0100
    Re: [Python-de] Datetime frage Manfred Gil <manfred-gil@t-online.de> - 2016-12-12 18:07 +0000
      Re: [Python-de] Datetime frage Hans-Peter Jansen <hpj@urpla.net> - 2016-12-12 21:42 +0100
        Re: [Python-de] Datetime frage Manfred Gil <manfred-gil@t-online.de> - 2016-12-13 17:38 +0000
          Re: [Python-de] Datetime frage Hans-Peter Jansen <hpj@urpla.net> - 2016-12-13 20:46 +0100

csiph-web