def fileConfig(file_name=DEFAULT_DATABASE_CONFIGURATION_FILE_NAME):
    """
    Configure database pools from the given configuration file. 
    Database configuration section names should start with prefix 'database_' 
    a name after that prefix is used as name for the registered connection pool.
    
    Configuration file should be named database.conf (default name) and located 
    in the current directory or if not found there in the PYTHON_PATH directories.
    This makes it possible to have one global configuration file, and then 
    add a local one for debugging purposes. Note, that config data is not being 
    merged and the file, first found is being used as a config file.
    
    Typical configuration file can look like that::
      
        [database_testdb1]
        dbname=testdb1 
        host=localhost
        port=5453
        user=test 
        password=test
        encoding=latin1
        statement_timeout=0
        
        [database_testdb2]
        dbname=testdb2 
        host=localhost
        port=5454
        user=test 
        password=test
    
    After the database access is configured, you can access database pools like::
    
        from myvideo.helpers import database
        database.fileConfig()
        testdb2_pool = database.get_connection_pool('testdb2')
    
    """
    # find configuration file
    file_name = find_file( file_name )
    # create configuration
    global databaseConfig #IGNORE:W0603
    databaseConfig = _DatabaseConfig(os.path.abspath(file_name))

    Configure database pools from the given configuration file. 
    Database configuration section names should start with prefix 'database_' 
    a name after that prefix is used as name for the registered connection pool.
    
    Configuration file should be named database.conf (default name) and located 
    in the current directory or if not found there in the PYTHON_PATH directories.
    This makes it possible to have one global configuration file, and then 
    add a local one for debugging purposes. Note, that config data is not being 
    merged and the file, first found is being used as a config file.
    
    Typical configuration file can look like that::
      
        [database_testdb1]
        dbname=testdb1 
        host=localhost
        port=5453
        user=test 
        password=test
        encoding=latin1
        statement_timeout=0
        
        [database_testdb2]
        dbname=testdb2 
        host=localhost
        port=5454
        user=test 
        password=test
    
    After the database access is configured, you can access database pools like::
    
        from myvideo.helpers import database
        database.fileConfig()
        testdb2_pool = database.get_connection_pool('testdb2')
    
    
recipes/Python/577072_Global_database_configuraticontext_aware/recipe-577072.py