-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or request
Description
- nbautoexport version: 0.5.0
- Python version: 3.9.13
- Operating System: Linux
Description
The output of cell with cell magic is a function call with a very long string! For instance look at this example output from the corresponding cell (cell number 15) from the notebook. The generated python script is hard to navigate/review!
If calling the run_cell_magic function is unavoidable, can at least the third argument be formatted to read somewhat like normal python source code (maybe using triple quote string)?
Here is a small example of the above behavior. For a notebook with two cells:
# Cell 1
import sys
print(sys.version)and
# Cell 2
%%time
x = 1
print(x)the script output is:
#!/usr/bin/env python
# coding: utf-8
import sys
print(sys.version)
get_ipython().run_cell_magic('time', '', 'x = 1\nprint(x)')It would be tremendously helpful if the timed cell content appeared like printed python code.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request