Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ec9d22 commit b9ff91bCopy full SHA for b9ff91b
1 file changed
lib/core/common.py
@@ -1506,13 +1506,20 @@ def beep():
1506
1507
if sys.platform == 'linux2':
1508
try:
1509
- audio = file('/dev/audio', 'wb')
+ if os.path.exists('/dev/audio'):
1510
+ audio = file('/dev/audio', 'wb')
1511
- for i in xrange(250):
1512
- audio.write(chr(32) * 4)
1513
- audio.write(chr(0) * 4)
+ for i in xrange(250):
+ audio.write(chr(32) * 4)
1514
+ audio.write(chr(0) * 4)
1515
- audio.close()
1516
+ audio.close()
1517
+ else:
1518
+ import curses
1519
+
1520
+ curses.initscr()
1521
+ curses.beep()
1522
+ curses.endwin()
1523
except:
1524
dataToStdout('\a', True)
1525
else:
0 commit comments