def _get_constant(name):
 field_re = re.compile('__{}__\\s+=\\s+(.*)'.format(re.escape(name)))
 path = os.path.join(BASEDIR, 'qutebrowser', '__init__.py')
 line = field_re.search(read_file(path)).group(1)
 value = ast.literal_eval(line)
 return value

def _get_constant ( name ) : field_re = re . compile ( '__{}__\\s+=\\s+(.*)' . format ( re . escape ( name ) ) ) path = os . path . join ( BASEDIR , 'qutebrowser' , '__init__.py' ) line = field_re . search ( read_file ( path ) ) . group ( 1 ) value = ast . literal_eval ( line ) return value
read a __magic__ constant from qutebrowser/__init__ .