nameko.cli.code¶
Classes¶
Custom InterativeConsole class that allows raising exception if needed. |
Functions¶
|
Module Contents¶
- class nameko.cli.code.RaisingInteractiveConsole(locals=None, filename='<console>', raise_expections=False)[源代码]¶
Bases:
code.InteractiveConsole
Custom InterativeConsole class that allows raising exception if needed.
Constructor.
The optional locals argument will be passed to the InteractiveInterpreter base class.
The optional filename argument should specify the (file)name of the input stream; it will show up in tracebacks.
- runcode(code)[源代码]¶
Execute a code object.
When an exception occurs, self.showtraceback() is called to display a traceback. All exceptions are caught except SystemExit, which is reraised.
A note about KeyboardInterrupt: this exception may occur elsewhere in this code, and may not always be caught. The caller should be prepared to deal with it.