title: How to make a sound in OSX using python 3
body: <p>So I am trying to play a simple beep after my code has finished because it takes a while to crunch a lot of data. I have tried other examples on the web, but nothing seems to work. I have tried:</p>
  
  <pre><code>import sys
  sys.stdout.write('\a')
  sys.stdout.flush()
  </code></pre>
  
  <p>which outputs the word bel in the IDE shell, but nothing else</p>
  
  <p>I have also tried:</p>
  
  <pre><code>import os
  print('\a')
  </code></pre>
  
  <p>which outputs the same exact thing. </p>
  
  <p>And I have tried</p>
  
  <pre><code>import os
  os.system('play --no-show-progress --null --channels 1 synth %s sine %f' % (   4, 4))
  </code></pre>
  
  <p>which simply outputs:</p>
  
  <pre><code>sh: play: command not found
  </code></pre>
  
  <p>Anybody have any ideas?</p>
  
  <p>Also here is a jpg containing the word bell. It looks funny...
  <a href="https://i.stack.imgur.com/hDB78.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hDB78.png" alt="Image of &#39;Bel&#39;"></a></p>
  
  <p>I also made sure my volume was up</p>
  
  <p>UPDATE: It might just be my IDE. I tried launching python directly from terminal and using write('\a') and it worked. It just won't work in wing 101</p>