On 3/30/26 02:50, Gisle Vanem via Python-list wrote:
Hello list.
I use 'configparser' with a 'config.ini' like this:
[Audio]
ATC_STREAM_URL = https://s1-fmt2.liveatc.net/vhhh5 # Hong Kong ATC.
# ...
Some of my code:
import configparser
config = configparser.ConfigParser()
con
Hello list.
I use 'configparser' with a 'config.ini' like this:
[Audio]
ATC_STREAM_URL = https://s1-fmt2.liveatc.net/vhhh5 # Hong Kong ATC.
# ...
Some of my code:
import configparser
config = configparser.ConfigParser()
config.read ("config.ini")
ATC_STREAM_URL = config.get ("Audi
I am using Python 3.13 and Windows 11.
I have a RAM disk (ImDisk), configured to be the R: drive.
When the RAM disc is empty,
os.scandir("R:")
raises a FileNotFoundError instead of (as I would have expected)
returning an empty iterator.
Whereas for an empty directory on a hard drive or memory
Mats Wichmann wrote:
A fix I use instead is to read the whole 'config.ini' myself,
strip the trailing comments and call
'config.read_string (fixed_lines)' instead.
But is there a simple way for all this?
It's described in the documentation. Recognizing Inline comments is supported, but by de