I tried to open python file (say model.py) in jupyter using
! vi model.py
But I was able to view only 25 lines. How to view entire file. I want to view files in jupyter notebook.
I tried to open python file (say model.py) in jupyter using
! vi model.py
But I was able to view only 25 lines. How to view entire file. I want to view files in jupyter notebook.
Jupyter notebook is shipped with inbuilt text editor. You can open any .py in text editor from jupyter notebook's File explorer.(Just click model.py to open it)
Also from inside the notebook you can use the following command, to load file in a cell of notebook.
%load filename.py
Edit: If you are a fan of vim or vi editor, try using it from terminal inside jupyter notebook.
in addition you can open up a ipython console and run
%edit [filename]
or if you don't want the file to execute once you're done working on it.
%edit -x [filename]
running %edit?
or %quickref?
in the console will provide a ton more information.