Skip to content

Commit f2d3412

Browse files
test
1 parent e12d028 commit f2d3412

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

run_shared/magic.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import time
3+
from string import Template
34
from typing import Any
45

56
from IPython.core.interactiveshell import InteractiveShell
@@ -29,7 +30,8 @@ def run_shared(self, line: str, local_ns: Any = None) -> Any:
2930
%run_shared shared_file.ipynb
3031
3132
"""
32-
shared_file = line.strip()
33+
template = Template(line.strip())
34+
shared_file = template.safe_substitute(local_ns)
3335
if not shared_file:
3436
raise ValueError('No shared file specified.')
3537
if shared_file.startswith("'") and shared_file.endswith("'"):

0 commit comments

Comments
 (0)