mirror of https://github.com/Jittor/Jittor
polish windows notebook
This commit is contained in:
parent
f796ad0d7f
commit
61ea95b76f
|
@ -9,7 +9,7 @@
|
|||
# file 'LICENSE.txt', which is part of this source code package.
|
||||
# ***************************************************************
|
||||
|
||||
__version__ = '1.3.1.42'
|
||||
__version__ = '1.3.1.43'
|
||||
from jittor_utils import lock
|
||||
with lock.lock_scope():
|
||||
ori_int = int
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
from .md_to_ipynb import dirname, notebook_dir
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
from distutils.dir_util import copy_tree
|
||||
|
||||
cmd = f"cp -r {dirname}/* {notebook_dir}/ && cd {notebook_dir} && jupyter notebook {' '.join(sys.argv[1:])}"
|
||||
print("run cmd:", cmd)
|
||||
os.system(cmd)
|
||||
copy_tree(dirname, notebook_dir)
|
||||
os.chdir(notebook_dir)
|
||||
os.system(f"{sys.executable} -m jupyter notebook")
|
|
@ -11,7 +11,7 @@ for r, _, f in os.walk(dirname):
|
|||
if not fname.endswith(".md"): continue
|
||||
all_md.append(os.path.join(r, fname))
|
||||
for mdname in all_md:
|
||||
with open(os.path.join(dirname, mdname), "r") as f:
|
||||
with open(os.path.join(dirname, mdname), "r", encoding="utf-8") as f:
|
||||
src = f.read()
|
||||
blocks = []
|
||||
for i, b in enumerate(src.split("```")):
|
||||
|
|
Loading…
Reference in New Issue