Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This fix partially solves issue #234 #242

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions octave_kernel/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ def plot_settings(self, settings):
cmds.append("graphics_toolkit('%s');" % settings['backend'])
else:
cmds.append("graphics_toolkit('%s');" % self._default_toolkit)

self.eval('\n'.join(cmds))
self.eval('\n'.join(cmds), silent=True)

def eval(self, code, timeout=None, silent=False):
"""Evaluate code using the engine.
Expand All @@ -256,6 +255,7 @@ def eval(self, code, timeout=None, silent=False):
line_handler=line_handler,
stdin_handler=self.stdin_handler)
resp = resp.replace(STDIN_PROMPT, '')
resp = resp.strip()
if self.logger and resp:
self.logger.debug(resp)
return resp
Expand All @@ -282,7 +282,7 @@ def make_figures(self, plot_dir=None):
"""
settings = self._plot_settings
if not settings['backend'].startswith('inline'):
self.eval('drawnow("expose");')
self.eval('drawnow("expose");', silent=True)
if not plot_dir:
return
if not self._has_startup:
Expand Down Expand Up @@ -349,7 +349,7 @@ def _startup(self):
cmd = 'more off; source ~/.octaverc; cd("%s");%s'
self.eval(cmd % (cwd, self.repl.prompt_change_cmd), silent=True)
here = os.path.realpath(os.path.dirname(__file__))
self.eval('addpath("%s")' % here.replace(os.path.sep, '/'))
self.eval('addpath("%s")' % here.replace(os.path.sep, '/'), silent=True)
self.plot_settings = self._plot_settings

def _handle_svg(self, filename):
Expand Down