I have the following code that reads the configuration file and stores the results in some variables as a list
import ConfigParser
def read_config_file():
config = ConfigParser.ConfigParser()
cnf_path = 'config_files/php.sr'
config.read(cnf_path)
if config.has_section('basic'):
if config.has_option('basic', 'basic'):
php_bsc_mdls = config.get('basic', 'basic').split(',')
if config.has_section('advance'):
if config.has_option('advance','advance'):
php_adv_mdls = config.get('advance', 'advance').split(',')
Now i want to get the result variables php_bsc_mdls
and php_adv_mdls
from the function
something like read_config_file.php_bsc_mdls
or read_config_file.php_adv_mdls
So is it possible to access/get the variables from the python function ?