전체 글(70)
-
XML 다루는법 - 파싱(Parse)
XML 데이터 다루는 법 파이썬에서는 기본적으로 XML을 다루는 패키지를 제공합니다. Sample Kim Cheol Soo 25 19940215 Kim Yoo Mee 21 19980417 XML 객체로 파싱하기 (두 가지 방법) 1. xml 파일 형태로 존재하는 경우 2. xml 문자열 형태로 존재하는 경우 1. xml 파일 형태로 존재하는 경우 xml 파일 경로와 함께 parser() 메서드 사용 import xml.etree.ElementTree as ET tree = ET.parse('C:/users.xml')2. xml 문자열 형태로 존재하는 경우 fromstring() 메서드에 xml 데이터 문자열을 넘김 import xml.etree.ElementTree as ET xmlStr ..
2023.10.09 -
glob
glob 파일들의 리스트를 뽑을 때 사용하는 라이브러리 파일의 경로명을 사용 예시 입력 from glob import glob print(glob('*.exe')) print(glob('*.txt'))출력 ['~~.exe', '~~~.exe', '~~~~.exe'] ['~~.txt', '~~~.txt', '~~~~.txt']
2023.10.09 -
한글 출력 2023.08.04
-
아두이노 64x32 매트릭스 RGB LED 전자 번호판 출력 2023.08.04
-
FK 153 2023.05.05
-
ATMEGA LED.점등
빨간색 노말, 오버플로 카운터0 1초 간격 노란색 CTC, 비교 일치 카운터2 1.5초 간격 #define F_CPU 16000000UL #include #include #include volatile int count1 = 0; volatile int count2 = 0; volatile int state1 = 0; volatile int state2 = 0; ISR(TIMER0_OVF_vect) { count1++; if (count1 == 64) { state1 = !state1; if (state1 == 0) PORTC |= 0x01; else PORTC &= 0x0E; count1 = 0; } } ISR(TIMER2_COMP_vect) { count2++; TCNT2 = 0; if (count2..
2023.04.24