Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #196921

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

From Karsten Hilbert <Karsten.Hilbert@gmx.net>
Newsgroups comp.lang.python
Subject Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read
Date 2024-10-31 17:10 +0100
Message-ID <mailman.60.1730391046.4695.python-list@python.org> (permalink)
References (3 earlier) <slrnvi4ksp.372.jon+usenet@raven.unequivocal.eu> <87r07xtwg7.fsf@zedat.fu-berlin.de> <slrnvi4ss3.372.jon+usenet@raven.unequivocal.eu> <87y124db0q.fsf@zedat.fu-berlin.de> <ZyOsAhhUNtIscTey@hermes.hilbert.loc>

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Using 'with open(...) as ...' together with configparser.ConfigParser.read "Loris Bennett" <loris.bennett@fu-berlin.de> - 2024-10-29 14:56 +0100
  Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read Jon Ribbens <jon+usenet@unequivocal.eu> - 2024-10-29 15:33 +0000
    Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read "Loris Bennett" <loris.bennett@fu-berlin.de> - 2024-10-30 14:03 +0100
      Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read Jon Ribbens <jon+usenet@unequivocal.eu> - 2024-10-30 15:41 +0000
        Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read "Loris Bennett" <loris.bennett@fu-berlin.de> - 2024-10-30 16:57 +0100
          Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read Jon Ribbens <jon+usenet@unequivocal.eu> - 2024-10-30 17:57 +0000
            Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read "Loris Bennett" <loris.bennett@fu-berlin.de> - 2024-10-31 07:47 +0100
              Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read Jon Ribbens <jon+usenet@unequivocal.eu> - 2024-10-31 08:41 +0000
              Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read Karsten Hilbert <Karsten.Hilbert@gmx.net> - 2024-10-31 17:10 +0100
              Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read MRAB <python@mrabarnett.plus.com> - 2024-10-31 17:06 +0000
  Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read MRAB <python@mrabarnett.plus.com> - 2024-10-29 16:10 +0000
  Re: Using 'with open(...) as ...' (Posting On Python-List Prohibited) Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-10-30 00:10 +0000

csiph-web