I want to initialize configparser with structured dict like: from configparser import ConfigParser from sys import stdout structured_dict = dict(section1=dict(option1=1, option2=2, option3=3)) config = ConfigParser(structured_dict) config.write(stdout) # my expected result: # [section1] # option1=1 # option2=2 # option3=3 # ... but nothing to show Environment Python 3.10 Continue reading...