Building an Interactive Console
Now we have everything needed to create
a basic interactive console. We implemented this as an extra child
window with a one-line text box for input and a multiline,
uneditable text box for output. When the user inputs an expression,
the VB console form executes the commands
TheBookServer.interpretString
(
expression
)
to get the return value and
TheBookServer.getStandardOutput to retrieve any
output that was generated. It then assembles these together into one
chunk of text and appends this to the output text box. Figure 8.1 is an example of our console in action.
![]() |
Note you have full access to the data of your running server and can modify its data. You can also create your own variables and generally do anything you can from a regular Python console.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access
