Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.python > #5537
| From | Kaeptm Blaubaer <kaeptmblaubaer1000@gmail.com> |
|---|---|
| Newsgroups | de.comp.lang.python |
| Subject | Re: [Python-de] cgi raspberry pi utf |
| Date | 2019-08-28 13:26 +0200 |
| Message-ID | <mailman.55.1566992050.30344.python-de@python.org> (permalink) |
| References | <gshl4uFmbocU1@mid.individual.net> <CAPPXo7Dsa-yatjgMnUScyWhPqck2CSnoyxHjUYuhf3_rvqtM6w@mail.gmail.com> |
>
> Statt print sys.stdout.write zu verwenden,
> scheint nicht das gewünschte Ergebnis zu bringen:
>
> >>> sys.stdout.write("bäh")
> bäh3
>
> Woher die 3 am Ende?
>
Die "write"-Methode von dateiähnlichen Objekten gibt stets zurück, wie
viele Zeichen (bei Streams mit encoding), oder wie viele Bytes (bei Raw und
Buffered) geschrieben wurden. Weil eine Zahl nicht None ist, wird das von
der interaktiven Python-Konsole angezeigt. Aber ich würde eher empfehlen,
die print()-Funktion zu verwenden.
>
Back to de.comp.lang.python | Previous | Next — Previous in thread | Find similar
cgi raspberry pi utf Hermann Riemann <nospam.ng@hermann-riemann.de> - 2019-08-26 10:55 +0200 Re: [Python-de] cgi raspberry pi utf Hartmut Goebel <h.goebel@goebel-consult.de> - 2019-08-26 11:09 +0200 Re: [Python-de] cgi raspberry pi utf Kaeptm Blaubaer <kaeptmblaubaer1000@gmail.com> - 2019-08-28 13:26 +0200
csiph-web