Python Tutorial
- jetzt Python programmieren lernen

Hilfe-Funktionen in Python

Es gibt mehrere Möglichkeiten sich in Python Hilfen ausgeben zu lassen. 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".

Hier können wir uns nun ü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".