"Znlpi_ZipMachine" class

Description

Owner: python

ZipMachine provides an interface from Zope and from the Zope tty window to walk through inform games. The underlying Zcode interpreter (dumb-frotz) runs asynchronously and is connected trough pipes.

Because there is only one tty terminal for Zope there can be only one running dumb-frotz instance at at time.

Used classes:

Class diagrams:

Znlpi_ZipMachineZnlpi_ZipMachine

Class diagram : Znlpi_ZipMachine class diagram

Operations:

Attributes: Sub-classes:

Examples

Description

Instances:

Sequence diagram : Znlpi_ZipMachine: instantiating a walk

This diagram shows the message flow when "walking" through a game, given anon-emptywalkthrough. The actualized resource is 'zcodeInternGameRunning' which invokes 'Znlpi_inf_out_play_mainInternal'. For the walkthrough and for the user both wo steps are assumed before quit.

"Znlpi_addZipWalk" operation

Description

public Znlpi_addZipWalk (
self in object ,
parent in object )
If a game is compiled to zcode a Znlpi_ZipClass instance is added under the NLPIClass instanceby this function.

Parameters:

"Znlpi_readFrotzOutput" operation

Description

public Znlpi_readFrotzOutput (
parentWalk in object ,
fread in object ,
fwrite in object )
DumbFrotz output handler: reads any output from the pipe from one turn and returns it.

It relies heavily

a) on the normal dumb-frotz output format for distinguishing different types of lines and

b) on additional the Zcode command prompt end "\xFE" to signal that no more chars are readable from the pipe.

Parameters:

"Znlpi_writeFrotzOutput" operation

Description

public Znlpi_writeFrotzOutput (
parentWalk in object ,
output in string ,
noLock=0 in integer )
Write the Frotz output to the Zope tty with scroll lock (but not in walkthrough mode unless explicitely requested; see Znlpipropsheet_prefsZip for details).

Parameters: