Pustaka Standar Python
**********************

Sementara Referensi Bahasa Python menjelaskan sintaks dan semantik
bahasa Python yang tepat, manual referensi pustaka ini menggambarkan
pustaka standar yang didistribusikan dengan Python. Ini juga
menjelaskan beberapa komponen opsional yang biasanya termasuk dalam
distribusi Python.

Perpustakaan standar Python sangat luas, menawarkan berbagai fasilitas
seperti yang ditunjukkan oleh daftar isi yang tercantum di bawah ini.
Pustaka berisi modul bawaan (ditulis dalam C) yang menyediakan akses
ke fungsionalitas sistem seperti file I/O yang seharusnya tidak dapat
diakses oleh programmer Python, serta modul yang ditulis dengan Python
yang menyediakan solusi standar untuk banyak masalah yang terjadi pada
pemrograman sehari-hari. Beberapa modul ini dirancang secara eksplisit
untuk mendorong dan meningkatkan portabilitas program Python dengan
mengabstraksi spesifik platform menjadi API platform-netral.

Pemasang Python untuk platform Windows biasanya menyertakan seluruh
pustaka standar dan sering juga menyertakan banyak komponen tambahan.
Untuk sistem operasi mirip Unix, Python biasanya disediakan sebagai
kumpulan paket, jadi mungkin perlu menggunakan alat pengemasan yang
disediakan dengan sistem operasi untuk mendapatkan beberapa atau semua
komponen opsional.

Selain pustaka standar, ada koleksi berkembang beberapa ribu komponen
(dari program individu dan modul ke paket dan seluruh kerangka kerja
pengembangan aplikasi), tersedia dari Python Package Index.

* Pengenalan

  * Catatan tentang ketersediaan

* Fungsi Bawaan

* Konstanta Bawaan

  * Konstanta yang ditambahkan oleh modul "site"

* Tipe Bawaan

  * Pengujian Kebenaran Nilai

  * Operasi *Boolean* --- "and", "or", "not"

  * Perbandingan

  * Numeric Types --- "int", "float", "complex"

  * Iterator Types

  * Sequence Types --- "list", "tuple", "range"

  * Text Sequence Type --- "str"

  * Binary Sequence Types --- "bytes", "bytearray", "memoryview"

  * Set Types --- "set", "frozenset"

  * Mapping Types --- "dict"

  * Context Manager Types

  * Generic Alias Type

  * Other Built-in Types

  * Atribut Spesial

  * Integer string conversion length limitation

* Built-in Exceptions

  * Exception context

  * Inheriting from built-in exceptions

  * Base classes

  * Concrete exceptions

  * Peringatan

  * Exception hierarchy

* Layanan Pemrosesan Teks

  * "string" --- Operasi umum pada string.

  * "re" --- Regular expression operations

  * "difflib" --- Helpers for computing deltas

  * "textwrap" --- Text wrapping and filling

  * "unicodedata" --- Unicode Database

  * "stringprep" --- Internet String Preparation

  * "readline" --- GNU readline interface

  * "rlcompleter" --- Completion function for GNU readline

* Servis Data Binary

  * "struct" --- Interpret bytes as packed binary data

  * "codecs" --- Codec registry and base classes

* Tipe Data

  * "datetime" --- Basic date and time types

  * "zoneinfo" --- IANA time zone support

  * "calendar" --- Fungsi-fungsi umum yang terkait dengan modul
    calendar

  * "collections" --- Container datatypes

  * "collections.abc" --- Abstract Base Classes for Containers

  * "heapq" --- Heap queue algorithm

  * "bisect" --- Array bisection algorithm

  * "array" --- Efficient arrays of numeric values

  * "weakref" --- Weak references

  * "types" --- Dynamic type creation and names for built-in types

  * "copy" --- Operasi shallow copy dan deep copy

  * "pprint" --- Data pretty printer

  * "reprlib" --- Alternate "repr()" implementation

  * "enum" --- Support for enumerations

  * "graphlib" --- Functionality to operate with graph-like structures

* Modul Numerik dan Matematika

  * "numbers" --- Numeric abstract base classes

  * "math" --- Mathematical functions

  * "cmath" --- Mathematical functions for complex numbers

  * "decimal" --- Decimal fixed point and floating point arithmetic

  * "fractions" --- Rational numbers

  * "random" --- Generate pseudo-random numbers

  * "statistics" --- Mathematical statistics functions

* Modul Pemrograman Fungsional

  * "itertools" --- Functions creating iterators for efficient looping

  * "functools" --- Higher-order functions and operations on callable
    objects

  * "operator" --- Standard operators as functions

* File and Directory Access

  * "pathlib" --- Object-oriented filesystem paths

  * "os.path" --- Common pathname manipulations

  * "fileinput" --- Iterate over lines from multiple input streams

  * "stat" --- Interpreting "stat()" results

  * "filecmp" --- File and Directory Comparisons

  * "tempfile" --- Generate temporary files and directories

  * "glob" --- Ekspansi pola nama jalur bergaya Unix

  * "fnmatch" --- Unix filename pattern matching

  * "linecache" --- Random access to text lines

  * "shutil" --- High-level file operations

* Persistensi Data

  * "pickle" --- Python object serialization

  * "copyreg" --- Register "pickle" support functions

  * "shelve" --- Python object persistence

  * "marshal" --- Internal Python object serialization

  * "dbm" --- Interfaces to Unix "databases"

  * "sqlite3" --- DB-API 2.0 antarmuka untuk basisdata SQLite

* Kompresi Data dan Pengarsipan

  * "zlib" --- Compression compatible with **gzip**

  * "gzip" --- Support for **gzip** files

  * "bz2" --- Support for **bzip2** compression

  * "lzma" --- Compression using the LZMA algorithm

  * "zipfile" --- Work with ZIP archives

  * "tarfile" --- Read and write tar archive files

* File Formats

  * "csv" --- Baca dan Tulis file CSV

  * "configparser" --- Configuration file parser

  * "netrc" --- netrc file processing

  * "plistlib" --- Generate and parse Apple ".plist" files

* Layanan Kriptografi

  * "hashlib" --- Secure hashes and message digests

  * "hmac" --- Keyed-Hashing for Message Authentication

  * "secrets" --- Generate secure random numbers for managing secrets

* Layanan Sistem Operasi Generik

  * "os" --- Miscellaneous operating system interfaces

  * "io" --- Core tools for working with streams

  * "time" --- Akses waktu dan konversi

  * "argparse" --- Parser for command-line options, arguments and sub-
    commands

  * "getopt" --- C-style parser for command line options

  * "logging" --- Logging facility for Python

  * "logging.config" --- Logging configuration

  * "logging.handlers" --- Logging handlers

  * "getpass" --- Portable password input

  * "curses" --- Terminal handling for character-cell displays

  * "curses.textpad" --- Text input widget for curses programs

  * "curses.ascii" --- Utilities for ASCII characters

  * "curses.panel" --- A panel stack extension for curses

  * "platform" ---  Access to underlying platform's identifying data

  * "errno" --- Standard errno system symbols

  * "ctypes" --- A foreign function library for Python

* Eksekusi Serentak

  * "threading" --- Thread-based parallelism

  * "multiprocessing" --- Process-based parallelism

  * "multiprocessing.shared_memory" ---  Provides shared memory for
    direct access across processes

  * Paket "concurrent"

  * "concurrent.futures" --- Launching parallel tasks

  * "subprocess" --- Subprocess management

  * "sched" --- Event scheduler

  * "queue" --- A synchronized queue class

  * "contextvars" --- Context Variables

  * "_thread" --- Low-level threading API

* Komunikasi Interproses dan Networking

  * "asyncio" --- Asynchronous I/O

  * "socket" --- Low-level networking interface

  * "ssl" --- TLS/SSL wrapper for socket objects

  * "select" --- Waiting for I/O completion

  * "selectors" --- High-level I/O multiplexing

  * "signal" --- Set handlers for asynchronous events

  * "mmap" --- Memory-mapped file support

* Penanganan Data Internet

  * "email" --- Paket penanganan email dan MIME

  * "json" --- JSON encoder dan decoder

  * "mailbox" --- Manipulate mailboxes in various formats

  * "mimetypes" --- Map filenames to MIME types

  * "base64" --- Base16, Base32, Base64, Base85 Data Encodings

  * "binhex" --- Encode and decode binhex4 files

  * "binascii" --- Convert between binary and ASCII

  * "quopri" --- Encode and decode MIME quoted-printable data

* Alat Pemroses Markup Terstruktur

  * "html" --- Dukungan *HyperText Markup Language*

  * "html.parser" --- Simple HTML and XHTML parser

  * "html.entities" --- Definisi entitas umum HTML

  * XML Processing Modules

  * "xml.etree.ElementTree" --- The ElementTree XML API

  * "xml.dom" --- The Document Object Model API

  * "xml.dom.minidom" --- Minimal DOM implementation

  * "xml.dom.pulldom" --- Support for building partial DOM trees

  * "xml.sax" --- Support for SAX2 parsers

  * "xml.sax.handler" --- Base classes for SAX handlers

  * "xml.sax.saxutils" --- SAX Utilities

  * "xml.sax.xmlreader" --- Interface for XML parsers

  * "xml.parsers.expat" --- Fast XML parsing using Expat

* Protokol Internet dan Dukungan

  * "webbrowser" --- Convenient Web-browser controller

  * "wsgiref" --- WSGI Utilities and Reference Implementation

  * "urllib" --- Modul penanganan URL

  * "urllib.request" --- Extensible library for opening URLs

  * "urllib.response" --- Response classes used by urllib

  * "urllib.parse" --- Parse URLs into components

  * "urllib.error" --- Exception classes raised by urllib.request

  * "urllib.robotparser" ---  Parser for robots.txt

  * "http" --- modul HTTP

  * "http.client" --- HTTP protocol client

  * "ftplib" --- FTP protocol client

  * "poplib" --- POP3 protocol client

  * "imaplib" --- IMAP4 protocol client

  * "smtplib" --- SMTP protocol client

  * "uuid" --- UUID objects according to **RFC 4122**

  * "socketserver" --- A framework for network servers

  * "http.server" --- HTTP servers

  * "http.cookies" --- HTTP state management

  * "http.cookiejar" --- Cookie handling for HTTP clients

  * "xmlrpc" --- XMLRPC server and client modules

  * "xmlrpc.client" --- akses klien XML-RPC

  * "xmlrpc.server" --- Basic XML-RPC servers

  * "ipaddress" --- IPv4/IPv6 manipulation library

* Layanan Multimedia

  * "wave" --- Read and write WAV files

  * "colorsys" --- Conversions between color systems

* Internasionalisasi

  * "gettext" --- Multilingual internationalization services

  * "locale" --- Internationalization services

* Kerangka Program

  * "turtle" --- Turtle graphics

  * "cmd" --- Support for line-oriented command interpreters

  * "shlex" --- Simple lexical analysis

* User Interfaces Grafis dengan Tk

  * "tkinter" --- Python interface to Tcl/Tk

  * "tkinter.colorchooser" --- Color choosing dialog

  * "tkinter.font" --- Tkinter font wrapper

  * Tkinter Dialogs

  * "tkinter.messagebox" --- Tkinter message prompts

  * "tkinter.scrolledtext" --- Scrolled Text Widget

  * "tkinter.dnd" --- Drag and drop support

  * "tkinter.ttk" --- Tk themed widgets

  * "tkinter.tix" --- Extension widgets for Tk

  * IDLE

* Alat Pengembangan

  * "typing" --- Support for type hints

  * "pydoc" --- Documentation generator and online help system

  * Python Development Mode

  * Effects of the Python Development Mode

  * ResourceWarning Example

  * Bad file descriptor error example

  * "doctest" --- Contoh uji interaktif Python

  * "unittest" --- Unit testing framework

  * "unittest.mock" --- mock object library

  * "unittest.mock" --- getting started

  * 2to3 - Automated Python 2 to 3 code translation

  * "test" --- Regression tests package for Python

  * "test.support" --- Utilities for the Python test suite

  * "test.support.socket_helper" --- Utilities for socket tests

  * "test.support.script_helper" --- Utilities for the Python
    execution tests

  * "test.support.bytecode_helper" --- Support tools for testing
    correct bytecode generation

* Debugging dan Profiling

  * Audit events table

  * "bdb" --- Debugger framework

  * "faulthandler" --- Dump the Python traceback

  * "pdb" --- The Python Debugger

  * The Python Profilers

  * "timeit" --- Measure execution time of small code snippets

  * "trace" --- Trace or track Python statement execution

  * "tracemalloc" --- Trace memory allocations

* Pengemasan dan Distribusi Perangkat Lunak

  * "distutils" --- Building and installing Python modules

  * "ensurepip" --- Bootstrapping the "pip" installer

  * "venv" --- Creation of virtual environments

  * "zipapp" --- Manage executable Python zip archives

* Layanan Runtime Python

  * "sys" --- System-specific parameters and functions

  * "sysconfig" --- Provide access to Python's configuration
    information

  * "builtins" --- Objek-objek bawaan

  * "__main__" --- Lingkungan skrip tingkat atas

  * "warnings" --- Warning control

  * "dataclasses" --- Data Classes

  * "contextlib" --- Utilities for "with"-statement contexts

  * "abc" --- Abstract Base Classes

  * "atexit" --- Exit handlers

  * "traceback" --- Print or retrieve a stack traceback

  * "__future__" --- Future statement definitions

  * "gc" --- Garbage Collector interface

  * "inspect" --- Inspect live objects

  * "site" --- Site-specific configuration hook

* Ubahsuaian Interpreter Python

  * "code" --- Interpreter base classes

  * "codeop" --- Compile Python code

* Mengimpor Modul

  * "zipimport" --- Import modules from Zip archives

  * "pkgutil" --- Package extension utility

  * "modulefinder" --- Find modules used by a script

  * "runpy" --- Locating and executing Python modules

  * "importlib" --- The implementation of "import"

  * Using "importlib.metadata"

* Layanan Bahasa Python

  * "parser" --- Access Python parse trees

  * "ast" --- Abstract Syntax Trees

  * "symtable" --- Access to the compiler's symbol tables

  * "symbol" --- Constants used with Python parse trees

  * "token" --- Konstanta digunakan dengan pohon pengurai (parse tree)
    Python

  * "keyword" --- Pengujian untuk kata kunci Python

  * "tokenize" --- Tokenizer for Python source

  * mod:*tabnanny* --- Deteksi indentasi ambigu

  * "pyclbr" --- Python module browser support

  * "py_compile" --- Compile Python source files

  * "compileall" --- Byte-compile Python libraries

  * "dis" --- Disassembler for Python bytecode

  * "pickletools" --- Tools for pickle developers

* Layanan Miscellaneous

  * "formatter" --- Pemformatan umum output

* Layanan MS Windows Spesifik

  * "msvcrt" --- Useful routines from the MS VC++ runtime

  * "winreg" --- Windows registry access

  * "winsound" --- Sound-playing interface for Windows

* Layanan Khusus Unix

  * "posix" --- The most common POSIX system calls

  * "pwd" --- The password database

  * "grp" --- The group database

  * "termios" --- POSIX style tty control

  * "tty" --- Terminal control functions

  * "pty" --- Pseudo-terminal utilities

  * "fcntl" --- The "fcntl" and "ioctl" system calls

  * "resource" --- Resource usage information

  * "syslog" --- Unix syslog library routines

* Modul yang Diganti

  * "aifc" --- Read and write AIFF and AIFC files

  * "asynchat" --- Asynchronous socket command/response handler

  * "asyncore" --- Asynchronous socket handler

  * "audioop" --- Manipulate raw audio data

  * "cgi" --- Common Gateway Interface support

  * "cgitb" --- Traceback manager for CGI scripts

  * "chunk" --- Read IFF chunked data

  * "crypt" --- Function to check Unix passwords

  * "imghdr" --- Determine the type of an image

  * "imp" --- Access the *import* internals

  * "mailcap" --- Mailcap file handling

  * "msilib" --- Read and write Microsoft Installer files

  * "nis" --- Interface to Sun's NIS (Yellow Pages)

  * "nntplib" --- NNTP protocol client

  * "optparse" --- Parser for command line options

  * "ossaudiodev" --- Access to OSS-compatible audio devices

  * "pipes" --- Interface to shell pipelines

  * "smtpd" --- SMTP Server

  * "sndhdr" --- Determine type of sound file

  * "spwd" --- The shadow password database

  * "sunau" --- Read and write Sun AU files

  * "telnetlib" --- Telnet client

  * "uu" --- Encode and decode uuencode files

  * "xdrlib" --- Encode and decode XDR data

* Security Considerations
