Skip to content

Commit 73ef602

Browse files
committed
Remove skip_preambula
1 parent 86cd946 commit 73ef602

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

powershell_kernel/powershell_proxy.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ def __init__(self, repl):
2929
self._repl_reader = ReplReader(repl)
3030
# this is a hack to detect when we stop processing this input
3131
self.send_input('function prompt() {"^"}')
32-
self.skip_preambula()
3332

34-
self.timer = Timer(0.1, self.update_view_loop)
35-
self.timer.start()
3633
self.stop_flag = False
3734
self.output = ''
38-
# clean-up output, it really should be a part of skip_preambula
35+
self.timer = Timer(0.1, self.update_view_loop)
36+
self.timer.start()
37+
# get preambula and eveluation of the prompt
3938
self.get_output()
39+
4040
self.output_prefix_stripped = True
4141
self.expected_output_prefix = ''
4242
self.expected_output_len = 0
@@ -64,15 +64,6 @@ def send_input(self, input):
6464

6565
self._repl.write(input + '\n')
6666

67-
def skip_preambula(self):
68-
try:
69-
while True:
70-
packet = self._repl_reader.queue.get_nowait()
71-
if packet is None:
72-
return False
73-
except queue.Empty:
74-
return True
75-
7667
def handle_repl_output(self):
7768
"""Returns new data from Repl and bool indicating if Repl is still
7869
working"""

0 commit comments

Comments
 (0)