将.ipynb文件转.py
import os
current_path=os.getcwd()
for root,dirs,files in os.walk(current_path):
for fileObj in files:
extension=os.path.splitext(fileObj)[-1]
if extension=='.ipynb':
print(root,fileObj)
os.system("jupyter nbconvert --to script %s\\%s"%(root,fileObj))