"Znlpi_ZipMachine" class

Description

Owner: Znlpi_ZipMachine

Operations:

Examples

Description

Instances:

"Znlpi_ZipWalkCheckIn" operation

Description

public Znlpi_ZipWalkCheckIn (
self in object ,
REQUEST in object ,
PARENTS in list )
Finally this seemed to work: After the dumb-frotz thread has finished the next request for seeing/editing the walkthrough first checks it into the local ZipClass instance.

Parameters:

"Znlpi_ZipMachine_open" operation

Description

public Znlpi_ZipMachine_open (
self in object ,
parent in object ,
parentWalk=None in object ,
walkPlay=0 in boolean )
Initialize a dumb-frotz instance and walk until ZipMachineWalkthroughPosition.

Only one instance can be open at a time. If a second is to be opened the first has to be closed first.

Parameters:

"Znlpi_dtmlZipMachine_open" operation

Description

public Znlpi_dtmlZipMachine_open (
self in object ,
REQUEST in object ,
PARENTS in list )
Interface for external access to Znlpi_ZipMachine_open

Parameters:

"Znlpi_ZipMachine_close" operation

Description

public Znlpi_ZipMachine_close (
self in object )
Close the dumb-frotz instance

Parameters:

"Znlpi_ZipOneTurn" operation

Description

public Znlpi_ZipOneTurn (
self in object ,
parent in object ,
parentWalk in object ,
fwrite in object ,
fread in object ,
userInput in string ,
term=1 in boolean ,
script=0 in boolean ,
noLock=0 in boolean )
return boolean
Perform one turn on open pipes.

Returns 1 if turn was 'quit' (or ^Z = "\xFF")

Dumb-frotz output is read here.

Parameters:

Return value:

0: walk continues

1: game was 'quit'

"Znlpi_ZipLoop_ttyThread" operation

Description

public Znlpi_ZipLoop_ttyThread (
self in object ,
parent in object ,
parentWalk in object ,
walkPlay in object )
tty main interpreter loop

Access only via threading. It has to care that "quit frotz" is done exclusively here because stdin.readline() blocks when it is run in a separate second thread.

When started always adds user input to the script in parentWalk (at least if parentWalk exists).

Parameters:

"Znlpi_ZipLoop_tty" operation

Description

public Znlpi_ZipLoop_tty (
self in object ,
parent in object ,
parentWalk=None in object ,
walkPlay=0 in boolean )
Entry point for the Znlpi_ZipLoop_ttyThread main interpreter loop. The thread is spawned as daemonic here.

Parameters:

"Znlpi_ZipWalkthroughForm" operation

Description

public Znlpi_ZipWalkthroughForm (
self in object ,
REQUEST in object ,
PARENTS in list )
Pproduce a walkthrough form for the dtml-method Znlpidtml_localWalkForm.

Includes game output if desired.

Parameters:

"Znlpi_ZipWalkthroughChangePosition" operation

Description

public Znlpi_ZipWalkthroughChangePosition (
self in object ,
REQUEST in object ,
PARENTS in list )
Interpret above form Znlpi_ZipWalkthroughForm and save the position to Znlpiprop_ZipWalkthroughPosition into the local caller instance.

Parameters:

"Znlpi_ZipWalkthroughChange" operation

Description

public Znlpi_ZipWalkthroughChange (
self in object ,
REQUEST in object ,
PARENTS in list )
Save an edited walkthrough to the ZnlpiZipClass instance.

Parameters:

"Znlpi_ZipWalkthroughSaveRequest" operation

Description

public Znlpi_ZipWalkthroughSaveRequest (
self in object ,
REQUEST in object ,
PARENTS in list )
Save any data needed by further walkthrough dtml pages or calls from the console and get it back by reference.

This is intended to live only until the second request is done and thus stores its data in the global dictionary Znlpi_ZipWalkRequestData.

Parameters:

"Znlpi_ZipWalkthroughRequest" operation

Description

public Znlpi_ZipWalkthroughRequest (
self in object ,
symbol in string )
return object
Gets back data stored in Znlpi_ZipWalkthroughSaveRequest.

Parameters: