Using 'with open(...) as ...' together with configparser.ConfigParser.read

Karsten Hilbert Karsten.Hilbert at gmx.net
Thu Oct 31 12:10:42 EDT 2024


Am Thu, Oct 31, 2024 at 07:47:17AM +0100 schrieb Loris Bennett via Python-list:

> However I didn't make myself clear: I understand that there are
> different functions, depending on whether I have a file name or a
> stream.  Nevertheless, I just can't think of a practical example where I
> might just have *only* a stream, especially one containing my
> configuration data.  I was just interested to know if anyone can give an
> example.

Apart from the fact that any data source can be made into a
file: one might have a stream of data coming in over, say,
http, as in a centralized configuration repository.

Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B


More information about the Python-list mailing list