def _get_region_from_config(config_path = (os.path.join(os.path.expanduser("~"), ".graphlab", "config"))): result = None if (os.path.isfile(config_path)): config = ConfigParser.ConfigParser() config.read(config_path) if(config.has_section(CONFIG_SECTION) and config.has_option(CONFIG_SECTION, 'region')): result = config.get(CONFIG_SECTION, 'region') return result