(cfgdict)
Read config-files, change configuration-dict accordingly.

    If there is a turtle.cfg file in the current working directory,
    read it from there. If this contains an importconfig-value,
    say 'myway', construct filename turtle_mayway.cfg else use
    turtle.cfg and read it from the import-directory, where
    turtle.py is located.
    Update configuration dictionary first according to config-file,
    in the import directory, then according to config-file in the
    current working directory.
    If no config-file is found, the default configuration is used.
Read config-files, change configuration-dict accordingly.
Read config - files change configuration - dict accordingly .
def readconfig(cfgdict):
    """Read config-files, change configuration-dict accordingly.

    If there is a turtle.cfg file in the current working directory,
    read it from there. If this contains an importconfig-value,
    say 'myway', construct filename turtle_mayway.cfg else use
    turtle.cfg and read it from the import-directory, where
    turtle.py is located.
    Update configuration dictionary first according to config-file,
    in the import directory, then according to config-file in the
    current working directory.
    If no config-file is found, the default configuration is used.
    """
    default_cfg = "turtle.cfg"
    cfgdict1 = {}
    cfgdict2 = {}
    if isfile(default_cfg):
        cfgdict1 = config_dict(default_cfg)
    if "importconfig" in cfgdict1:
        default_cfg = "turtle_%s.cfg" % cfgdict1["importconfig"]
    try:
        head, tail = split(__file__)
        cfg_file2 = join(head, default_cfg)
    except Exception:
        cfg_file2 = ""
    if isfile(cfg_file2):
        cfgdict2 = config_dict(cfg_file2)
    _CFG.update(cfgdict2)
    _CFG.update(cfgdict1)
def readconfig ( cfgdict ) : default_cfg = "turtle.cfg" cfgdict1 = { } cfgdict2 = { } if isfile ( default_cfg ) : cfgdict1 = config_dict ( default_cfg ) if "importconfig" in cfgdict1 : default_cfg = "turtle_%s.cfg" % cfgdict1 [ "importconfig" ] try : head , tail = split ( __file__ ) cfg_file2 = join ( head , default_cfg ) except Exception : cfg_file2 = "" if isfile ( cfg_file2 ) : cfgdict2 = config_dict ( cfg_file2 ) _CFG . update ( cfgdict2 ) _CFG . update ( cfgdict1 )