Skip to content

Commit

Permalink
Fixed pyte call
Browse files Browse the repository at this point in the history
  • Loading branch information
vadim0x60 committed Oct 3, 2023
1 parent e12ba02 commit d26593c
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 57 deletions.
123 changes: 70 additions & 53 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion programlib/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def run(self, input_lines=[], force=True):

self.stdout, self.exitstatus = self.language.run(self.workdir, self.name, input_lines)
assert force or not self.exitstatus, f'Exit status {self.exitstatus}'
return repr(self.stdout).splitlines()
return self.term.emulate(self.stdout)

def spawn(self, delimiter='\n'):
"""
Expand Down
4 changes: 2 additions & 2 deletions programlib/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def emulate(self, raw_output, clean=True):
self.screen.reset()

if clean:
lines = (line.rstrip() for line in lines)
lines = (line for line in lines if line)
lines = [line.rstrip() for line in lines]
lines = [line for line in lines if line]

return lines
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "programlib"
version = "7.1.0"
version = "7.1.1"
description = "Programs as Objects"
authors = ["Vadim Liventsev <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit d26593c

Please sign in to comment.