title: Run Jupyter Notebook (.ipynb) from command line as if it were a .py file
body: <p>I am authoring a Jupyter notebook on my local machine that will eventually be run on a remote server (which is running Ubuntu).  Every time I need to make a change I must export the notebook as a <code>.py</code> file and then call it from the command line of the server. </p>
  
  <p>I'd like to be able to run this on the fly, calling one command that takes the current <code>.ipynb</code> file and executes it on the command line as if it were a <code>.py</code>, showing all the print statements and output you'd expect if the <code>.py</code> were run.  I thought <code>nbconverter</code> might do the trick using something like the following command:</p>
  
  <pre><code>jupyter nbconvert --to script --execute nbconvert_test.ipynb
  </code></pre>
  
  <p>As it turnout, this does not convert the <code>.ipynb</code> to a <code>.py</code> file to be executed on the command line as I would like, but rather it creates a new file called <code>nbconvert_test.py</code> in the same directory which I would then have to run in a separate command.  I'd really like to prevent the creation of that file every time I make even a small change, and to skip the extra step on the command line.</p>
  
  <p>Any help is appreciated!</p>