title: How to code "Restart Kernel and Run all" in button for Python Jupyter Notebook?
body: <p>I'm trying to create a GUI in Jupyter notebook using python. I have coded the buttons to execute the code using widgets. But I'm running into two issues:</p>
  
  <ol>
  <li>Code a snippet to restart kernel and run all cells (rs_button in the code snippet below)</li>
  <li>Less important: Is there anyway I can hide all the codes in python and just keep the buttons as well as user input cells on display?</li>
  </ol>
  
  <p>Here's what I've been trying:</p>
  
  <pre><code>import ipywidgets as widgets
  from IPython.display import display
  rs_button = widgets.Button(description="Restart Kernel!")
  exec_button = widgets.Button(description="Click Me!")
  display(rs_button,exec_button)
  
  def rs_button_clicked(b):
      IPython.notebook.execute_cell();
  
  
  def exec_button_clicked(b):
      import data_assess_v6 as data_profiler
      (execution_time) = data_profiler.data_profile(path,file)
  
  rs_button.on_click(rs_button_clicked)
  exec_button.on_click(exec_button_clicked)
  </code></pre>
  
  <p>Thanks</p>