QuestionQ6

VerifiedFile Processing and Communicating with a Program’s Environment

Which of the following methods can be used to load a configuration when using ConfigParser?

Choose two
Explanation

The configparser.ConfigParser class in Python's standard library provides the read() method to load configuration data from one or more filenames, and the read_dict() method to load configuration data from a dictionary. These are documented methods of the ConfigParser class, unlike 'read_conf' (not a real method) and 'read_str' (the actual method is named read_string, not read_str).

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!