간단한 자막 파싱용 파이썬 코드
글쓴이: 익명 사용자 / 작성시간: 수, 2011/10/26 - 4:55오후
제가 자막을 간단하게 뽑아내려고 파이썬을 만지고 있습니다.
그런데 지금 코드에서 에러도 뜨지 않는데 아무런 메시지도 출력이되지 않더군요
좀 도와주세요.
def smireader():
subtitle = open('test.smi')
subtext = subtitle.read()
linenum = subtext.count('\n')+1
counter = 0
while counter == linenum:
processline = subtitle.readline()
if processline.find('sync') != -1:
millindex = processline.find('sync') + 11
millindex2 = processline.find('><')-1
milli = processline[millindex:millindex2]
print (milli)
counter=counter+1
smireader()Forums:

while counter != linenum: 이렇게
이렇게 먼저 고쳐야겠습니다.
고작 블로킹 하나, 고작 25점 중에 1점, 고작 부활동
"만약 그 순간이 온다면 그때가 네가 배구에 빠지는 순간이야"
댓글 달기