프로그램
[파이썬] 문제 : 파일명 찾아 없을때 알람(BeepSound)
오디세이99
2022. 11. 21. 09:04
728x90
반응형
import os
import winsound as sd
def beepsound():
fr = 900 # frequence range : 37 ~ 32767
du = 300 # Duration : 1000 ms = 1 second
sd.Beep(fr, du)
img_name = 'c:/temp/img.png'
if os.path.exists(img_name):
print('Image Found!!!')
else:
print('Image Not Found!!!')
beepsound() # 이미지가 없어요
728x90
반응형