(config_filename, environment)
Dumps the configuration of the given environment to the specified
    file. The file can then be re-read with the :py:func:`configure_environment`
    function.
Dumps the configuration of the given environment to the specified
    file. The file can then be re-read with the :py:func:`configure_environment`
    function.
Dumps the configuration of the given environment to the specified file . The file can then be re - read with the : py : func : configure_environment function .
def write_environment_configuration(config_filename, environment):
    """
    Dumps the configuration of the given environment to the specified
    file. The file can then be re-read with the :py:func:`configure_environment`
    function.

    """
    factory = environment.factory

    config = cp.RawConfigParser()

    config.add_section("global")
    inf = "true" if environment.enable_infix_notation else "false"
    pl = " ".join(factory.solver_preference_list)
    config.set("global", "use_infix_notation", inf)
    config.set("global", "solver_preference_list", pl)

    for s in factory.all_solvers():
        if factory.is_generic_solver(s):
            args,logics = factory.get_generic_solver_info(s)

            sec_name = 'smtlibsolver %s' % s
            config.add_section(sec_name)

            config.set(sec_name, "command", " ".join(args))
            config.set(sec_name, "logics", " ".join(str(l) for l in logics))


    # Writing the configuration to file
    with open(config_filename, 'wt') as configfile:
        config.write(configfile)
def write_environment_configuration ( config_filename , environment ) : factory = environment . factory config = cp . RawConfigParser ( ) config . add_section ( "global" ) inf = "true" if environment . enable_infix_notation else "false" pl = " " . join ( factory . solver_preference_list ) config . set ( "global" , "use_infix_notation" , inf ) config . set ( "global" , "solver_preference_list" , pl ) for s in factory . all_solvers ( ) : if factory . is_generic_solver ( s ) : args , logics = factory . get_generic_solver_info ( s ) sec_name = 'smtlibsolver %s' % s config . add_section ( sec_name ) config . set ( sec_name , "command" , " " . join ( args ) ) config . set ( sec_name , "logics" , " " . join ( str ( l ) for l in logics ) ) # Writing the configuration to file with open ( config_filename , 'wt' ) as configfile : config . write ( configfile )