How do I convert a IPython Notebook into a Python file via commandline?

后端 未结 10 2569
一生所求
一生所求 2020-11-29 14:42

I\'m looking at using the *.ipynb files as the source of truth and programmatically \'compiling\' them into .py files for scheduled jobs/tasks.

The

10条回答
  •  萌比男神i
    2020-11-29 15:02

    For converting all *.ipynb format files in current directory to python scripts recursively:

    for i in *.ipynb **/*.ipynb; do 
        echo "$i"
        jupyter nbconvert  "$i" "$i"
    done
    

提交回复
热议问题