ConfigParser is a Python module for reading and writing configuration files that have a structure similar to those of INI files in Microsoft Windows.
Questions tagged [configparser]
683 questions
-2
votes
1 answer
Using normal python variables and writing them into configparser
Hello I'm just starting out with my first python projects. The python variable "key_name" is asked from the user. This variable should then be written into the configparser file under the section [keys] -> personal. Basically where the "{}" are. And…

rdev
- 3
- 1
-2
votes
1 answer
Why changing the key value in config file using configparser turning keys name into small letters and ":" to "="?
I am using Python function to create my config file and it is working fine once it is created successfully.
I am opening that file to update the password key value and it is changing but it is changing other things as well. It is changing all CAPS…

unknown
- 1,815
- 3
- 26
- 51
-2
votes
1 answer
How to set a list (not a string) on a configparser parameter
I want to set a parameter of an .ini file. I use the configparser module, but I notice that every time I save a parameter, it is stored as a string. It there a possibility to convert a string formatted as a list, like "['p1', 'p2', 'p3']", into a…

nn65
- 31
- 1
- 1
- 7
-2
votes
1 answer
Why can't I use super() in a configparser constructor?
In Python 3, I should be able to use super() in a class method as a substitute for the parent class:
class demodict(OrderedDict):
def __setitem__(self, key, val):
print(key)
super().__setitem__(self, key, val)
The above behaves…

alexis
- 48,685
- 16
- 101
- 161
-3
votes
1 answer
Python: ConfigParser with wildcards in section names
Does anybody have an elegant way of handling wildcards in the section names?
What I was looking was something like this:
[DEFAULT]
foo = 1
bar = 2
[ABC???]
foo = 11
[XYZ???]
bar = 20

user2494295
- 1
- 1
-4
votes
1 answer
configparser, convert keys into variables
hello and thanks
i hope i am posting in the correct area
i want to convert a .ini file into local variables.
for example, let's say i have this .ini
[DEFAULT]
Value1=False
Value2=0
[section]
Value1=True
i need to create variables named
Value1 with…

asdffdsa6131
- 11
- 3
-4
votes
4 answers
How to read configurations parameters from an INI file?
I want to set some paths of excel files in the INI file to be read by my code in Python. Can you please tell me how to call them?
In my ini file I have something like this:
[common]
default_path = "C:/Users/XX/Desktop/Bk.xlsx/"

Gogo78
- 267
- 2
- 10