Deutsch   English   Français   Italiano  
<mailman.60.1730391046.4695.python-list@python.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: Karsten Hilbert <Karsten.Hilbert@gmx.net>
Newsgroups: comp.lang.python
Subject: Re: Using 'with open(...) as ...' together with
 configparser.ConfigParser.read
Date: Thu, 31 Oct 2024 17:10:42 +0100
Lines: 17
Sender: <karsten.hilbert@gmx.net>
Message-ID: <mailman.60.1730391046.4695.python-list@python.org>
References: <87plnj3te6.fsf@zedat.fu-berlin.de>
 <slrnvi2035.372.jon+usenet@raven.unequivocal.eu>
 <87bjz1vj2c.fsf@zedat.fu-berlin.de>
 <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>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Trace: news.uni-berlin.de qglLStn9ru/nVb0DquUbqwQ+J5proRWX4MEVoLzoyOhw==
Cancel-Lock: sha1:150xA8GZj7m5NaR82ayCqxmoCf4= sha256:WhoI6iLGl58R3m5Whyi9ujEiJCzJ9btxlZ09bGEtPlk=
Return-Path: <karsten.hilbert@gmx.net>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
 reason="2048-bit key; unprotected key"
 header.d=gmx.net header.i=karsten.hilbert@gmx.net
 header.b=Q3r8RLsB; dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.002
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'stream': 0.04; '31,':
 0.05; 'containing': 0.05; 'received:212.227': 0.07; 'example.':
 0.09; 'gpg': 0.09; 'karsten': 0.09; 'repository.': 0.09;
 'schrieb': 0.09; '1713': 0.16; 'bennett': 0.16; 'functions,':
 0.16; 'over,': 0.16; 'stream.': 0.16; "can't": 0.17; 'thu,': 0.19;
 'to:addr:python-list': 0.20; 'anyone': 0.25; 'coming': 0.27;
 'fact': 0.28; 'think': 0.29; 'subject:Using': 0.32; 'there': 0.33;
 'header:In-Reply-To:1': 0.34; "didn't": 0.34; 'source': 0.36;
 'example': 0.37; 'file': 0.38; 'data.': 0.40; 'file:': 0.40;
 'interested': 0.68; 'depending': 0.70; 'practical': 0.84; 'say,':
 0.84; 'subject: \n ': 0.84; 'subject:open': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
 s=s31663417; t=1730391043; x=1730995843; i=karsten.hilbert@gmx.net;
 bh=2fzUQU/uJmLpIArXSgLB/0bPSsR0F9TSc+NW/s0eO3o=;
 h=X-UI-Sender-Class:Date:From:To:Subject:Message-ID:References:
 MIME-Version:Content-Type:In-Reply-To:Content-Transfer-Encoding:
 cc:content-transfer-encoding:content-type:date:from:message-id:
 mime-version:reply-to:subject:to;
 b=Q3r8RLsBRoidguU1HP1rOUZab99P1jfLg5ggf1/9sDm9873f32T25EF2v7M8x+To
 nEV9ZzmetaD5o+esEfB0H8K8KgHEU6YwuoxKclczAX8f9B7ZrhqgAEMoRzpbdK3vJ
 ruPCJKwWjeQjMxSNNgDwXYgRyPQaY3L1CEREobjvsLvzfNJMaQpuLAv/Yg25kkLN1
 9Y1mFKeGCDjr2TPMvded7SKmW9uw78i7laibN8owX1KB6BGFdxJPvq3T6a8QQvknC
 0wsE0aGbAKJ43dFZlagZhxINrK79m6asHVqUZ5Ao4YkIXOxFnavukKJUybGy7EvWI
 6P6j+FEMfiy6FZFv7g==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Content-Disposition: inline
In-Reply-To: <87y124db0q.fsf@zedat.fu-berlin.de>
Ma_X_il-Followup-to: d
Re_X_turn-receipt-to: Karsten.Hilbert@gmx.net
Di_X_sposition-Notification-To: Karsten.Hilbert@gmx.net
X-Confi_X_rm-Reading-To: Karsten.Hilbert@gmx.net
X-Pri_X_ority: 2 (High)
X-Provags-ID: V03:K1:+ZyiML2Y2st43j8Gyh9Cmp3QEXRUw/txBlS+K87lVpqjkZBIoCh
 ot08FngYW4b/s4AGQi9Hp24DL9oNwEBklB1fzlLk0FKZm4+jkFjpNI/i9dtoj+iLWrAQNf5
 ofgcDY7a3n3ygwYloIoltWc0LA/m3IdMdb4Ji2A1NU3HaTWOjK8bN6Qa61ybN0vTRdnCXGY
 u8ZgYWvXcngCZmv6e5MCA==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:JE3rzos5vYA=;AMs3vRhy3zITOwFUWQg97hQrQSR
 //o0ElxyXJd4aesHRswAjLxMGRM2xbGIaUaTv3I5ClfGLv67z/njJuQRwmY/MrUo4cixUW+yT
 KHttIyI7MK2BhV8HSciS3wryEPd8Eo36L5LU2l3ahLyX8ekgEaidt6Kxwdq7trKCBRVUjodbk
 MN7zfqtf3adgHkqrsz+TDtAXFgIdXYRRJ1hFpXjyJFblVKdO9bXIXZd3k7uxoMsK+dw5C5bFv
 UfrFd13J1gZ7Kq7Pczd9Cn7TNLFurcBRMY5pUQi3NuNyMb7tF2V4f7uD4CIzmSXjHEifM2YUI
 j7wITrQXdrkvE6C/lXrXjZSu7Oa6LF8Jetf8Pqz4irHu7PprfzXUIWcbxKmqSSdFnQaus+DVv
 XbKIRtASuDMwiJs9yByHegPCovjkLtIfMEBzjghSfBy+qIh4ma+5ro5qjJT8G0PIq09mayYcS
 ai8uEEGt8PeY9ymg16nbBnoEb7+CDl39khjTZWukSkEunsh0ZDikzU/HogX+y+0A6tZf2BoeK
 VmI4Ax/rh8gs+ZBI3aeYlx/DsGdZYxvANwp9L8KCiN+XqoeYAYTBkpZYvLOcE2Iix18GkerY7
 HodZ6UiUDUPP7ooDfVXtScN+Jyc8XwvURPCl7ZXwjIDGghRVymmhJRdfxEQNVgbB7bQnPjdUR
 rc6XOJsKJ1/yvaZUR7CEz40NIGiqElmQGneESDB9LEGu9Y70ZtUy62HlsR1Iu58R+K/9zZu6i
 L8tuygA9+qYNaNbnfyNo74e/FFsPsu+333Tcy69FHo/F+mSxCTJPv2fQFX7amGTmyxsfOJnBo
 Zlpougtu9Jcx00Uy7QUbnKxQ==
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
 <python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
 <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
 <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <ZyOsAhhUNtIscTey@hermes.hilbert.loc>
X-Mailman-Original-References: <87plnj3te6.fsf@zedat.fu-berlin.de>
 <slrnvi2035.372.jon+usenet@raven.unequivocal.eu>
 <87bjz1vj2c.fsf@zedat.fu-berlin.de>
 <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>
Bytes: 6203

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
=2D-
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B