python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Map ConfigParser dictionary to a class constructor with correct value types
I have a config ini file which looks like below:
[user]
name=john
sex=male
age=19
income=2345.99
And I have a Python class called User with __init__ constructor below:
class User:
def __init__(se...
user2150279
Votes: 0
Answers: 1
Parse .conf file using python
I have a file called clients.conf .
Here is its content :
client: {
# client data
name: "James"
information: {
age: "32"
adress: "258 Arthur Street...

Nab
Votes: 0
Answers: 1
execute a function inside another function
I have this configuration file (test_conf.txt):
[function]
exptime1 = |def foo(f):
| result=float(f['a'])
| return result
and this code that works without problem
c = con...

Astrom
Votes: 0
Answers: 2
ConfigParser .set not working as expected
I'm having trouble understanding why my code isn't working as expected. I want to choose, as I boot up for the first time my program, the path each of two datasets.
#Import
import tkinter as tk
import...
Tom
Votes: 0
Answers: 1