sim.version module

Module version contains Version class which is used to store the latest version of PyMoSim.

The latest version of PyMoSim can be shown by:

from sim.simulation import World
sim = World()
print("Running PyMoSim version v%d.%d.%d"%sim.version())

Note

  • Created by: CH Foh (2022)

class sim.version.Version

Bases: object

This class stores the release version of the simulator and provide some useful methods to compare versions.

Methods

compare(other)

It compare the release version with other, and returns 1 if other is higher, 0 if same, -1 if lower.

release_version = (0, 8, 10)

The current release version of PyMoSim containing (major,minor,build) version.

static compare(other) → int

It compare the release version with other, and returns 1 if other is higher, 0 if same, -1 if lower.

Parameters
othertuple (int,int,int)

The version to compare with the released version.

Returns
int

It returns 1 if other is a higher (or more recent) release, 0 if same, or -1 if lower (or earlier release).