You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def _exist(self, name):
"""
Test whether a name exists and return the name code.
Raises an error when the name does not exist.
"""
if not self._engine:
msg = "Session is not open"
raise Oct2PyError(msg)
resp = self._engine.eval(cmd, silent=True).strip()
exist = int(resp.split()[-1])
isn't removing some character sequences from the response integer.
e.g. I get "invalid literal for int() with base 10: '\r\n\x1b[?2004h'", when exist should equal 5 with msg equalling "ans = 5", meaning a builtin ("addpath")
which suggests \r\n\x1b[?2004h isnt getting stripped from the string, as I don't think it's getting split properly.
I'm running oct2py on 3.9.
The text was updated successfully, but these errors were encountered:
Hi,
from what I can tell,
isn't removing some character sequences from the response integer.
e.g. I get "invalid literal for int() with base 10: '\r\n\x1b[?2004h'", when exist should equal 5 with msg equalling "ans = 5", meaning a builtin ("addpath")
which suggests \r\n\x1b[?2004h isnt getting stripped from the string, as I don't think it's getting split properly.
I'm running oct2py on 3.9.
The text was updated successfully, but these errors were encountered: