from Common.base import Base section = 'login' username = '******' password = '******' s = Base() s.config_write(section) s.config_write(section, 'username', username) s.config_write(section, 'password', password) url = s.config_read('test', 'url', url='test/test1') get_username = s.config_read(section, 'username') get_password = s.config_read(section, 'password') s.config_remove(section, 'usrename', ) s.config_remove(section, 'password') s.config_remove(section)
from Common.base import Base section = '我要' username = '******' password = '******' config = Base() config.config_write(section) config.config_write(section, 'username', username) config.config_write(section, 'password', password) url = config.config_read('test', 'url', url='test/test1') get_username = config.config_read(section, 'username') get_password = config.config_read(section, 'password') config.config_remove( section, 'usrename', ) config.config_remove(section, 'password') config.config_remove(section)