반응형 이미지보기1 [Python] : 명화 감상 프로그램 명화 감상 프로그램 프로그램을 실행시키면 파일을 선택할 수 있는 버튼이 생깁니다. 파일 열기로 불러와 줍니다. 이 gif 파일을 불러오겠습니다. 이미지가 프로그램에 표시됩니다. 프로그램 종료를 누르면 프로그램이 종료됩니다. from tkinter import * from tkinter.filedialog import * #함수 선언 부분 def func_open() : filename = askopenfilename(parent = window, filetypes = (("gif파일", "*.gif"), ("모든 파일","*.*"))) photo = PhotoImage(file =filename) pLabel.configure(image = photo) pLabel.image = photo def fun.. 2021. 11. 3. 이전 1 다음 반응형