configparser (1) 썸네일형 리스트형 [10] configparser, argparser configparser - 파일에 parser 프로그램의 실행 설정을 file에 저장함 Section, Key, Value 값의 형태로 설정된 설정 파일을 사용 설정파일을 Dict Type으로 호출후 사용 'example.cfg' [SectionOne] Status: Single Name: Derek Value: Yes Age: 30 Single: True [SectionTwo] FavoriteColor = Green [SectionThree] FamilyName: Johnson import configparser config = configparser.ConfigParser() config.read('example.cfg') config.sections() # sections 확인 for key in .. 이전 1 다음