In [ ]:


In [14]:
from IPython.display import HTML
HTML('''<script>
  function code_toggle() {
    if (code_shown){
      $('div.input').hide('500');
      $('#toggleButton').val('Show Code')
    } else {
      $('div.input').show('500');
      $('#toggleButton').val('Hide Code')
    }
    code_shown = !code_shown
  }

  $( document ).ready(function(){
    code_shown=false;
    $('div.input').hide()
  });
</script>
<form action="javascript:code_toggle()"><input type="submit" id="toggleButton" value="Show Code"></form>''')


Out[14]:

In [1]:
%run ./drops.py

In [2]:
interact (pan_sonify, percentage=(0,100,5))

button = widgets.Button(description="Sonify Me!")
display(button)
#button.on_click(on_button_clicked)



In [7]:
pt.stop()
pt.join()


Out[7]:
1

In [8]:
import os

In [9]:
os.system("nano ./pan.py")


Out[9]:
256

In [3]:
os.system("python")


Out[3]:
0

In [4]:
os.system("python pan.py")


Out[4]:
256

In [ ]: