Usage

Contents

From the Command Line

python3 -m gpss [-S] [-d] [-o outfile] infile

On Windows, use py -3 instead of python3.

Arguments

Also:

gpss.py as a Package

gpss.py can be imported into another script as the gpss module.

import gpss

gpss.run("examples/barber.gps")
print(gpss.createReport())

Functions

gpss.parse(infile=None, program=None)

Parse a gpss.py program from file infile or string program.

The parser used can be accessed through gpss.parser, and its error count through gpss.parser.error_count.

gpss.run(infile=None, program=None)

Run a simulation. If specified, file infile or string program will be parsed with gpss.parse() before running the simulation. Otherwise, the program last parsed will be used.

A gpss.SimulationError will be raised if anything illegal occurs in the simulation.

gpss.createReport()

Return a master simulation report. Contained within are all the simulation reports returned by gpss.getReports().

gpss.getReports()

Return a list of reports from each run in the simulation.