Show 모니터링을 할 경우 어떤한 조건이 Fail 발생할 때, 비프음을 발생시켜 간단하게 모니터링을 할 수 있다.
DOCS : https://docs.python.org/3/library/winsound.html?highlight=winsound#module-winsound
공유하기 게시글 관리 구독하기System Admin저작자표시 비영리 변경금지
'Python > Python for Windows' 카테고리의 다른 글[Python] win32evtlog 모듈을 이용한 윈도우 이벤트 로그 추출 (0)2018.05.20[Python] 리스트의 index를 활용하여 문자열 분리 (0)2018.05.13[Python] subprocess 모듈과 DOS ping 명령어를 이용한 핼스 체크 (0)2018.05.09[Python] sys모듈로 입력인수 처리하기 (0)2018.05.07[Python] Check shared folder of Windows operating system using subprocess and regular expression (0)2018.05.04[Python] SQLite 메모리DB를 활용한 파이썬 IIS 로그파서 (0)2018.04.27[Python] xcopy DOS명령어를 조합한 증분 백업 (0)2018.04.20[Python] 윈도우 서버에서 SMTP서버로 메일 발송 (2) (0)2018.04.18PYTHON, sound 모듈, winsound module, 알람, 윈도우 비프음, 파이썬, 파이썬 beep, 파이썬 비프음, 파이썬 소리 , 댓글 0개가 달렸습니다 댓글을 달아 주세요비밀글 Maybe you have just begun coding in Python. Maybe the entire outset seems inconclusive since you have been working with regular IDEs and would like to obtain a bit more out of what your code does on the respective console and maybe a little music or tune might just liven it up. This article serves the purpose of introducing to you the winsound module, an object or file with a set of attributes or functions, specific to the task of generating or playing sound or a sound file. Note: The winsound module is defined only for execution on a Windows Platform, hence the name WINsound. Since, the winsound module is a builtin, there is no need for you to install it prior to executing it. The basic action would be to import winsound and then based upon the kind of output you would like, type out the following functions:
Python3
The respective audio file named 'Welcome.wav' is executed.0 = The respective audio file named 'Welcome.wav' is executed.2 The respective audio file named 'Welcome.wav' is executed.3 The respective audio file named 'Welcome.wav' is executed.4
Python3
The respective audio file named 'Welcome.wav' is executed.2 The respective audio file named 'Welcome.wav' is executed.0 = Play Windows question sound2
Play Windows question sound3 Play Windows question sound4 Play Windows question sound5 Play Windows question sound6 Play Windows question sound7 Play Windows question sound8 Play Windows question sound9 import 0import 1import 2
The respective audio file named 'Welcome.wav' is executed.2
The respective audio file named 'Welcome.wav' is executed.0 import 7= Play Windows question sound2
Python3
The respective audio file named 'Welcome.wav' is executed.
Python3
Play Windows question sound There are various other winsound functions, most of which are particular to specific tasks, some of which deal with runtime parameters. Nonetheless, the functions mentioned above should suffice as long as the idea is to play around to get an idea of what can be accomplished using this module. |