conf=configparser.ConfigParser() conf.read("yunying.ini") fndir=conf.get("main","fndir") [main] fndir=xxx