class_docstr: Widget displaying console output and accepting command input.
  Implements:
      
    - eval python expressions / exec python statements
    - storable history of commands
    - exception handling allowing commands to be interpreted in the context of any level in the exception stack frame
  
  Why not just use python in an interactive shell (or ipython) ? There are a few reasons:
     
    - pyside does not yet allow Qt event processing and interactive shell at the same time
    - on some systems, typing in the console _blocks_ the qt event loop until the user presses enter. This can
      be baffling and frustrating to users since it would appear the program has frozen.
    - some terminals (eg windows cmd.exe) have notoriously unfriendly interfaces
    - ability to add extra features like exception stack introspection
    - ability to have multiple interactive prompts, including for spawned sub-processes
class_docstr_tok: ["Widget","displaying","console","output","and","accepting","command","input",".","Implements",":","-","eval","python","expressions","\/","exec","python","statements","-","storable","history","of","commands","-","exception","handling","allowing","commands","to","be","interpreted","in","the","context","of","any","level","in","the","exception","stack","frame","Why","not","just","use","python","in","an","interactive","shell","(","or","ipython",")","?","There","are","a","few","reasons",":","-","pyside","does","not","yet","allow","Qt","event","processing","and","interactive","shell","at","the","same","time","-","on","some","systems",",","typing","in","the","console","_blocks_","the","qt","event","loop","until","the","user","presses","enter",".","This","can","be","baffling","and","frustrating","to","users","since","it","would","appear","the","program","has","frozen",".","-","some","terminals","(","eg","windows","cmd.exe",")","have","notoriously","unfriendly","interfaces","-","ability","to","add","extra","features","like","exception","stack","introspection","-","ability","to","have","multiple","interactive","prompts",",","including","for","spawned","sub-processes"]
code: def setStack(self, frame=None):
      self.excHandler.setStack(frame)
  
imports: import os
  import sys
  import pickle
  import subprocess
  from ..None import getConfigOption
  from ..Qt import QtCore, QtWidgets
  from .repl_widget import ReplWidget
  from .exception_widget import ExceptionHandlerWidget
label_desc: Use image node_id 5 for calling the ConsoleWidget obj's underlying member method code with example usage: obj.setStack(frame) without return types