implement executing of tasks inside worker thread cleanups, reimplement Isolate/New/OpenGerber as OOP style Shell commands disable edit during shell execution, show some progress add ability for breakpoints in other threads and only if available add X11 safe flag, not sure what happen on windows
25 lines
715 B
Python
25 lines
715 B
Python
import termwidget
|
|
|
|
|
|
class FCShell(termwidget.TermWidget):
|
|
def __init__(self, sysShell, *args):
|
|
termwidget.TermWidget.__init__(self, *args)
|
|
self._sysShell = sysShell
|
|
|
|
def is_command_complete(self, text):
|
|
def skipQuotes(text):
|
|
quote = text[0]
|
|
text = text[1:]
|
|
endIndex = str(text).index(quote)
|
|
return text[endIndex:]
|
|
while text:
|
|
if text[0] in ('"', "'"):
|
|
try:
|
|
text = skipQuotes(text)
|
|
except ValueError:
|
|
return False
|
|
text = text[1:]
|
|
return True
|
|
|
|
def child_exec_command(self, text):
|
|
self._sysShell.exec_command(text) |