iteebot/configurator.py
def write_config_file(path):
    """
    Writes factory configuration to path. If the file exists, its contents are
    only updated from the factory configuration, options that have been set
    in the file are retained. Can be used to create a config file template when
    installing the bot, and also to update an existing configuration file to
    include options that have been added in an update.
    
    * path (str) - path to the configuration file
    """

    try:
        config = load_config(path)
    except FileNotFoundError:
        print("No existing configuration, writing fresh file")
        config = FACTORY.copy()
        os.makedirs(os.path.dirname(path), exist_ok=True)
        
    with open(path, "w", encoding="utf-8") as f:
        json.dump(config, f, indent=4)

    Writes factory configuration to path. If the file exists, its contents are
    only updated from the factory configuration, options that have been set
    in the file are retained. Can be used to create a config file template when
    installing the bot, and also to update an existing configuration file to
    include options that have been added in an update.
    
    * path (str) - path to the configuration file
    
Writes factory configuration to path. If the file exists, its contents are
only updated from the factory configuration, options that have been set
in the file are retained. Can be used to create a config file template when
installing the bot, and also to update an existing configuration file to
include options that have been added in an update.

path (str) - path to the configuration file
Writes factory configuration to path . If the file exists its contents are only updated from the factory configuration options that have been set in the file are retained . Can be used to create a config file template when installing the bot and also to update an existing configuration file to include options that have been added in an update . path ( str ) - path to the configuration file
def write_config_file(path):
    try:
        config = load_config(path)
    except FileNotFoundError:
        print("No existing configuration, writing fresh file")
        config = FACTORY.copy()
        os.makedirs(os.path.dirname(path), exist_ok=True)
    with open(path, "w", encoding="utf-8") as f:
        json.dump(config, f, indent=4)
def write_config_file ( path ) : try : config = load_config ( path ) except FileNotFoundError : print ( "No existing configuration, writing fresh file" ) config = FACTORY . copy ( ) os . makedirs ( os . path . dirname ( path ) , exist_ok = True ) with open ( path , "w" , encoding = "utf-8" ) as f : json . dump ( config , f , indent = 4 )
Writes factory configuration to path.
Writes factory configuration to path .
"""
    Writes factory configuration to path. If the file exists, its contents are
    only updated from the factory configuration, options that have been set
    in the file are retained. Can be used to create a config file template when
    installing the bot, and also to update an existing configuration file to
    include options that have been added in an update.
    
    * path (str) - path to the configuration file
    """
path