##// END OF EJS Templates
Merge pull request #12612 from jpavlav/pathlib_everywhere
Matthias Bussonnier -
r26139:3fdf4743 merge
parent child Browse files
Show More
@@ -11,6 +11,7 b''
11 import re
11 import re
12 import shlex
12 import shlex
13 import sys
13 import sys
14 from pathlib import Path
14
15
15 from pathlib import Path
16 from pathlib import Path
16 from IPython.core.magic import Magics, magics_class, line_magic
17 from IPython.core.magic import Magics, magics_class, line_magic
@@ -9,7 +9,7 b''
9 #
9 #
10 # The original mapping of latex symbols to unicode comes from the `latex_symbols.jl` files from Julia.
10 # The original mapping of latex symbols to unicode comes from the `latex_symbols.jl` files from Julia.
11
11
12 import os, sys
12 from pathlib import Path
13
13
14 # Import the Julia LaTeX symbols
14 # Import the Julia LaTeX symbols
15 print('Importing latex_symbols.js from Julia...')
15 print('Importing latex_symbols.js from Julia...')
@@ -80,9 +80,8 b' s += """'
80 reverse_latex_symbol = { v:k for k,v in latex_symbols.items()}
80 reverse_latex_symbol = { v:k for k,v in latex_symbols.items()}
81 """
81 """
82
82
83 fn = os.path.join('..','IPython','core','latex_symbols.py')
83 fn = Path("..", "IPython", "core", "latex_symbols.py")
84 print("Writing the file: %s" % fn)
84 print("Writing the file: %s" % str(fn))
85 with open(fn, 'w', encoding='utf-8') as f:
85 fn.write_text(s, encoding="utf-8")
86 f.write(s)
87
86
88
87
General Comments 0
You need to be logged in to leave comments. Login now