ID EN
Config Parser

read

Python 3.11 🇮🇩 Bahasa Indonesia

Mencoba membaca dan mengurai nama file yang dapat diubah, mengembalikan daftar nama file yang berhasil diuraikan.

Syntax

PYTHON
read(filenames, encoding=None)

Contoh

Example 1
PYTHON
import configparser, os

config = configparser.ConfigParser()
config.read_file(open('defaults.cfg'))
config.read(['site.cfg', os.path.expanduser('~/.myapp.cfg')],
            encoding='cp1250')

See Also

bytes path-like object ConfigParser read_file() read() open() path-like object bytes