kpshell - An Interactive KP Shell


[Contents] [Prev] [Next]
Table of Contents

Name

kpshell -- an interactive KP shell utility

Synopsis

submit tools/kpshell/kpshell.py

Description

The kpshell program is an interactive KP shell utility. The KP emulates the Python interpreter's command loop and allows the user to interactively execute KP-specific operations, like migration.

The interpreter loop provided by kpshell is a lot like the Python interpreter's interactive mode, but there are some differences:

The initial environment for kpshell contains one variable, self, which is bound to the KP instance. There is one instance variable, self.kos, that is bound to the KOS bastion. The basic prompt looks like this:

"glyph-1" is the KP's original ID.

After the KP migrates, the prompt indicates the original service station and the current service station:

This first prompt indicates that the KP is the original glyph-1.

The kpshell can clone just like any other KP, but it will be difficult to use the shell after the clone. Two different KPs will be reading from the same input stream; IO buffering and contention for user input causes confusing overlap. Only one KP, however, will receive any particular line of input. So you can raise SystemExit to cause one of the clones to exit.


Table of Contents

[Contents] [Prev] [Next]
Copyright © 1998 by the Corporation for National Research Initiatives.