Skip to content

Commit 0271e51

Browse files
authored
Merge pull request #1219 from Notnaton/fix-magic-command-shell
Fix %% magic command
2 parents 7e96b82 + fdb8a09 commit 0271e51

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

interpreter/core/computer/terminal/terminal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def _streaming_run(self, language, code, display=False):
110110
and chunk.get("format") != "active_line"
111111
and chunk.get("content")
112112
):
113-
print(chunk["content"])
113+
print(chunk["content"], end="")
114114

115115
except GeneratorExit:
116116
self.stop()

interpreter/terminal_interface/magic_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def handle_magic_command(self, user_input):
255255
# Handle shell
256256
if user_input.startswith("%%"):
257257
code = user_input[2:].strip()
258-
self.computer.run("shell", code, stream=True, display=True)
258+
self.computer.run("shell", code, stream=False, display=True)
259259
print("")
260260
return
261261

0 commit comments

Comments
 (0)