diff --git a/eg/config.py b/eg/config.py index 661057a..799f73f 100644 --- a/eg/config.py +++ b/eg/config.py @@ -317,7 +317,11 @@ def get_config_tuple_from_egrc(egrc_path): config = ConfigParser.RawConfigParser() except AttributeError: config = ConfigParser() - config.readfp(egrc) + # Support Python 3.12 and above. + try: + config.readfp(egrc) + except: + config.read_file(egrc) # default to None examples_dir = None