Skip to content

Commit 62f13b9

Browse files
Update converter_with_figs.py
1 parent 0ee7bfc commit 62f13b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

misc/book/converter_with_figs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
@author: aleksandra
66
"""
7-
import os
7+
import runpy
88

99

1010
def convert(file_name):
@@ -15,7 +15,7 @@ def convert(file_name):
1515
my_code = my_file.readlines()
1616

1717
if 'import matplotlib.pyplot as plt\n' in my_code:
18-
os.system(file_name)
18+
runpy.run_path(file_name)
1919

2020
text = ''
2121
code = False

0 commit comments

Comments
 (0)