Read a file and extract data and assign to a variable from a python file
问题 I am trying to extract BINPATH, LIBPATH,CPPPATH from a conan.txt file which looks like: conan = { "conan" : { "CPPPATH" : ['something'], "BINPATH" : ['something'], "LIBS" : ['something'], "CPPDEFINES" : [], "CXXFLAGS" : [], "CCFLAGS" : [], "SHLINKFLAGS" : [], "LINKFLAGS" : [], }, "conan_version" : "None", "boost" : { "CPPPATH" : ['C:\\.conan\\123456\\1\\include'], "LIBPATH" : ['C:\\.conan\\123456\\1\\lib'], "BINPATH" : ['C:\\.conan\\123456\\1\\lib'], "LIBS" : [], "CPPDEFINES" : [], "CXXFLAGS"