beepbeep

Why isn't print(\a) working in IDLE

天大地大妈咪最大 提交于 2019-12-06 04:42:06
问题 NOTE I changed the q slightly so that it is not a duplicate anymore. Sorry. I have these time-consuming bioinformatics scripts I am running. I'd like them to sound a beep when they are done. I am on OS X. In a similar thread I found that print '\a' might work, but in Idle this just prints [] Why does this not work in IDLE 回答1: The reason it doesn't beep is that \a (or ^G ) is the terminal bell code; it's up to the program handling stdout to turn that into a sound. Terminal.app will play a

Why isn't print(\\a) working in IDLE

折月煮酒 提交于 2019-12-04 07:25:21
NOTE I changed the q slightly so that it is not a duplicate anymore. Sorry. I have these time-consuming bioinformatics scripts I am running. I'd like them to sound a beep when they are done. I am on OS X. In a similar thread I found that print '\a' might work, but in Idle this just prints [] Why does this not work in IDLE The reason it doesn't beep is that \a (or ^G ) is the terminal bell code; it's up to the program handling stdout to turn that into a sound. Terminal.app will play a sound (unless you configure it to do "visual bell" instead, of turn it off entirely), but Idle will not. And,