Apologies if it has already been asked, or if the solution is trivially simple.
Using Jupyter Notebook for Python scripting. When I download a notebook as a .py file (by clicking on File->Download as->Python (.py)), Jupyter adds a bunch of extraneous commented lines. It adds some interpreter shebang, encoding declaration at the beginning, and then #In[], #Out[] for each cell etc. To make matters more troublesome, the shebang looks like
#!/usr/bin/env python
even though I am using a python3 kernel.
While I am sure it has the best intentions, very often I want to have my own interpreter directive and skip the other commented lines altogether since they do nothing but adding to the clutter.
How to download just the raw codes, only with comments that I inserted, and cells separated by nothing but line breaks? Also, I would like to know a permanent solution to change the configuration to download it this way, for all ipynb files on my machine, not a one time commmand.