In src/mslice/widgets/ipythonconsole/ipython_widget.py, the cleanup() method executes cls (?) in ipython to clear the console:
def cleanup(self):
if in_mantid():
self.execute("cls")
self.execute("import mslice.cli as mc")
This causes a NameError because IPython tries to evaluate it as Python code (variable reference to variable cls):
NameError Traceback (most recent call last)
Cell In[2], line 1
----> 1 cls
Why not just use self.clear() ?
Environment:
- mslice version: 2.13
- OS: Linux
- File: src/mslice/widgets/ipythonconsole/ipython_widget.py
To reproduce:
- Open mantid
- Open mslice
- Close mslice
- Open mslice
- See error message
In src/mslice/widgets/ipythonconsole/ipython_widget.py, the cleanup() method executes
cls(?) in ipython to clear the console:This causes a NameError because IPython tries to evaluate it as Python code (variable reference to variable
cls):Why not just use
self.clear()?Environment:
To reproduce: