There was an error while loading. Please reload this page.
1 parent 1d50946 commit a98876aCopy full SHA for a98876a
ipynb_to_py.py
@@ -29,6 +29,7 @@ def to_py(content, path):
29
relpath = os.path.basename(path).replace('ipynb', 'py')
30
output = os.path.join(OUTPUT_BASE, \
31
os.path.dirname(path).replace(os.getcwd()+'/', ''), relpath)
32
+ output = output.replace(' ', '')
33
output_base = os.path.dirname(output)
34
35
if not os.path.isdir(output_base):
@@ -40,7 +41,10 @@ def to_py(content, path):
40
41
42
43
def load_ipynb(base):
- list(map(foreach_ipynb, glob.iglob(base+'/*.ipynb')))
44
+ if os.path.isfile(base) and base.endswith('.ipynb'):
45
+ foreach_ipynb(base)
46
+ return
47
+ list(map(foreach_ipynb, glob.iglob(os.path.join(base, '*.ipynb'))))
48
49
50
def start_scan(base=None):
0 commit comments