Skip to Content
Programmieren von Kopf bis Fuß
book

Programmieren von Kopf bis Fuß

by David Griffiths, Paul Barry
April 2010
Beginner to intermediate
440 pages
9h 7m
German
O'Reilly Verlag
Content preview from Programmieren von Kopf bis Fuß

Und wie erstellen wir ein Modul?

Denken Sie daran: Ein Modul ist einfach eine Datei, die etwas Python-Code enthält. Nehmen wir also den Code, der geteilt werden soll, aus der Datei sport.py heraus:

image with no caption

Speichern Sie dann den Code in einer Datei namens transaktion.py. Sie haben gerade ein neues Modul erzeugt.

Und wie nutzt man es?

Nachdem Sie ein Modul erstellt haben, müssen Sie dem Programm sagen, dass es dieses nutzen soll. Als Sie Bibliothekscode nutzten, mussten Sie diesen importieren. Das Gleiche machen Sie mit Ihren eigenen Modulen. Anstelle von Code aus der Python-Standardbibliothek nutzen Sie Bibliothekscode, den Sie selbst geschrieben haben. Sie ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Softwareentwicklung von Kopf bis Fuß

Softwareentwicklung von Kopf bis Fuß

Dan Pilone, Russ Miles
Netzwerke von Kopf bis Fuß

Netzwerke von Kopf bis Fuß

Al Anderson, Ryan Benedetti

Publisher Resources

ISBN: 9783868993127Purchase bookSupplemental Content