Python Tutorial
- jetzt Python programmieren lernen

Hilfe-Funktionen in Python

Es gibt mehrere Möglichkeiten sich in Python Hilfen ausgeben zu lassen.

  • Windows Hilfe Programm „Python Manuals“
  • Online als HTML-Dokumentation (mit Suche)
  • Offline (die gleiche HTML-Dokumentation)
  • über IDLE
  • in der Python-Konsole (Python Shell)

Windows Hilfe Programm „Python Manuals“

Bei der Installation unter Windows wird auch das Windows-Hilfeprogramm „Python Manuals“ mit installiert. Dieses kann jederzeit aufgerufen werden und bequem durchsucht werden.

Windows Hilfe Programm Python Manuals
Windows Hilfe Programm Python Manuals

Hilfe Online als HTML-Dokumentation (mit Suche)

Direkt Online kann man sich über die URL https://docs.python.org/3/library/ die komplette aktuelle Hilfe anzeigen lassen. Diese ist mit einer Suchfunktion ausgestattet.

Online-Hilfe – Python Dokumentation
Online-Hilfe – Python Dokumentation

Es gibt eine Auswahl der verschiedenen Python-Versionen und als Sprache Englisch, Französisch, Japanisch, Koreanisch, Chinesisch.

Offline (die gleiche HTML-Dokumentation)

Die HTML-Dokumentation wird der Installation mitgeliefert. Diese findet sich in einem Unterverzeichnis.

Beim Mac:
file:///Library/Frameworks/Python.framework/
Versions/3.7/Resources/English.lproj/Documentation/index.html

Effektiv ist diese identisch mit der Online-Dokumentation – allerdings wird man Online immer den aktuellen Stand bekommen.

Hilfe über IDLE aufrufen

Über die Menüzeile von IDLE kann direkt die Python Dokumentation aufgerufen werden. Hier bekommen wir die HTML-Dokumentation angezeigt, die bei der Installation mitgeliefert wurde. Gibt es bereits eine neuere Python-Version, ist die Online-Dokumentation empfehlenswert (wie auch die neue Version zu installieren).

Hilfe über IDLE aufrufen
Hilfe über IDLE aufrufen

In diesem Screenshot sieht man zusätzlich das Ausführen der Hilfe über die Konsole mit help().

Hilfe über die Python-Konsole (Python Shell)

Die einfachste Möglichkeit besteht wie in der Begrüßung von Python angekündigt über help().

>>> help()

Welcome to Python 3.7's help utility!

If this is your first time using Python, you should definitely check out the tutorial on the Internet at https://docs.python.org/3.7/tutorial/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type "quit".

To get a list of available modules, keywords, symbols, or topics, type "modules", "keywords", "symbols", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose name or summary contain a given string such as "spam", type "modules spam".

Module von Python

Zu den Modulen gibt es später im Kurs entsprechenden Tutorials.

Über die Python-Konsole können wir uns über die bereits standardmäßig in Python verfügbaren Module informieren. Dazu einfach nach dem Prompt help> dann module eingeben.

help> modules
Please wait a moment while I gather a list of all available modules...
__future__          _tkinter            glob                sched
_abc                _tracemalloc        grp                 secrets
_ast                _uuid               gzip                select
_asyncio            _warnings           hallowelt           selectors
_bisect             _weakref            hashlib             setuptools
_blake2             _weakrefset         heapq               shelve
_bootlocale         _xxtestfuzz         hmac                shlex
_bz2                abc                 html                shutil
_codecs             aifc                http                signal
_codecs_cn          antigravity         idlelib             site
_codecs_hk          argparse            imaplib             smtpd
_codecs_iso2022     array               imghdr              smtplib
_codecs_jp          ast                 imp                 sndhdr
_codecs_kr          asynchat            importlib           socket
_codecs_tw          asyncio             inspect             socketserver
_collections        asyncore            io                  sqlite3
_collections_abc    atexit              ipaddress           sre_compile
_compat_pickle      audioop             itertools           sre_constants
_compression        base64              json                sre_parse
_contextvars        bdb                 keyword             ssl
_crypt              binascii            lib2to3             stat
_csv                binhex              linecache           statistics
_ctypes             bisect              locale              string
_ctypes_test        builtins            logging             stringprep
_curses             bz2                 lzma                struct
_curses_panel       cProfile            macpath             subprocess
_datetime           calendar            mailbox             sunau
_dbm                cgi                 mailcap             symbol
_decimal            cgitb               marshal             symtable
_dummy_thread       chunk               math                sys
_elementtree        cmath               mimetypes           sysconfig
_functools          cmd                 mmap                syslog
_hashlib            code                modulefinder        tabnanny
_heapq              codecs              multiprocessing     tarfile
_imp                codeop              netrc               telnetlib
_io                 collections         nis                 tempfile
_json               colorsys            nntplib             termios
_locale             compileall          ntpath              test
_lsprof             concurrent          nturl2path          textwrap
_lzma               configparser        numbers             this
_markupbase         contextlib          opcode              threading
_md5                contextvars         operator            time
_multibytecodec     copy                optparse            timeit
_multiprocessing    copyreg             os                  tkinter
_opcode             crypt               parser              token
_operator           csv                 pathlib             tokenize
_osx_support        ctypes              pdb                 trace
_pickle             curses              pickle              traceback
_posixsubprocess    dataclasses         pickletools         tracemalloc
_py_abc             datetime            pip                 tty
_pydecimal          dbm                 pipes               turtle
_pyio               decimal             pkg_resources       turtledemo
_queue              difflib             pkgutil             types
_random             dis                 platform            typing
_scproxy            distutils           plistlib            unicodedata
_sha1               doctest             poplib              unittest
_sha256             dummy_threading     posix               urllib
_sha3               easy_install        posixpath           uu
_sha512             email               pprint              uuid
_signal             encodings           profile             venv
_sitebuiltins       ensurepip           pstats              warnings
_socket             enum                pty                 wave
_sqlite3            errno               pwd                 weakref
_sre                faulthandler        py_compile          webbrowser
_ssl                fcntl               pyclbr              wsgiref
_stat               filecmp             pydoc               xdrlib
_string             fileinput           pydoc_data          xml
_strptime           fnmatch             pyexpat             xmlrpc
_struct             formatter           queue               xxlimited
_symtable           fractions           quopri              xxsubtype
_sysconfigdata_m_darwin_darwin ftplib              random              zipapp
_testbuffer         functools           re                  zipfile
_testcapi           gc                  readline            zipimport
_testimportmultiple genericpath         reprlib             zlib
_testmultiphase     getopt              resource            
_thread             getpass             rlcompleter         
_threading_local    gettext             runpy               
Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose name or summary contain the string "spam".

Weiterempfehlen • Social Bookmarks • Vielen Dank

Bitte unterstützen Sie dieses Projekt

Sie können dieses Projekt in verschiedenen Formen unterstützen - wir würden uns freuen und es würde uns für weitere Inhalte motivieren :).

Empfehlen Sie es weiter - wir freuen uns immer über Links und Facebook-Empfehlungen.

Das neue E-Book zum Kurs gibt es zum Kaufen.

Sie können uns auch eine Spende über PayPal zukommen lassen.

Bestellen Sie Bücher über folgenden Link bei Amazon:
Bücher über Python

Vielen Dank für Ihre Unterstützung