python
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
python [2017/07/27 20:53] – [argparse] olli | python [2024/04/01 07:55] (aktuell) – [argparse] olli | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== Python ====== | ====== Python ====== | ||
- | Python ist eine interpretierte höhere Programmiersprache, | + | Python ist eine interpretierte höhere Programmiersprache, |
+ | Die Version Python 2 wird seit April 2020 nicht mehr unterstützt. | ||
===== Übersicht über nützliche Bibliotheken ===== | ===== Übersicht über nützliche Bibliotheken ===== | ||
Zeile 47: | Zeile 48: | ||
</ | </ | ||
- | * [[https:// | + | * [[https:// |
* [[https:// | * [[https:// | ||
Zeile 105: | Zeile 106: | ||
Seit Python 3.5 kann auch '' | Seit Python 3.5 kann auch '' | ||
+ | ==== Exceptions ==== | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
Zeile 112: | Zeile 115: | ||
===== argparse ===== | ===== argparse ===== | ||
- | * [[https:// | + | * [[https:// |
Zeile 191: | Zeile 194: | ||
==== Validierung der Argumente ==== | ==== Validierung der Argumente ==== | ||
- | Mit dem '' | + | Mit dem '' |
<WRAP important round> | <WRAP important round> | ||
Zeile 223: | Zeile 226: | ||
</ | </ | ||
==== Links ==== | ==== Links ==== | ||
- | * [[http:// | + | * [[https:// |
===== csv ===== | ===== csv ===== | ||
==== Zeilenende ==== | ==== Zeilenende ==== | ||
Zeile 254: | Zeile 257: | ||
x[x == inf] = 0 | x[x == inf] = 0 | ||
</ | </ | ||
+ | |||
+ | ===== UTF-8 ===== | ||
+ | Python 3 unterstützt UTF-8 gut und komfortabel. | ||
+ | In Python 2 muss das Encoding eines Sourcefiles | ||
+ | mit | ||
+ | <code python> | ||
+ | # -*- coding: utf-8 -*- | ||
+ | </ | ||
+ | oder | ||
+ | <code python> | ||
+ | # coding: utf8 | ||
+ | </ | ||
+ | explizit gesetzt werden und Strings müssen das Präfix | ||
+ | '' | ||
+ | <code python> | ||
+ | some_string = u' | ||
+ | </ | ||
+ | |||
+ | * [[https:// | ||
+ | |||
===== Tipps & Tricks ===== | ===== Tipps & Tricks ===== | ||
python.1501181620.txt.gz · Zuletzt geändert: 2017/07/27 20:53 von olli