All float and double values are represented by Python floating point
numbers.
In most cases, Python integers are also allowed.

All arrays are represented by one-dimensional Python lists.
In most cases, tuples are also allowed.

All string and character arguments are represented by Python strings,
for instance,
winopen('Hi There!')
and
rotate(900, 'z').

All (short, long, unsigned) integer arguments or return values that are
only used to specify the length of an array argument are omitted.
For example, the C call

lmdef(deftype, index, np, props)

is translated to Python as

lmdef(deftype, index, props)

Output arguments are omitted from the argument list; they are
transmitted as function return values instead.
If more than one value must be returned, the return value is a tuple.
If the C function has both a regular return value (that is not omitted
because of the previous rule) and an output argument, the return value
comes first in the tuple.
Examples: the C call

getmcolor(i, &red, &green, &blue)

is translated to Python as

red, green, blue = getmcolor(i)

The following functions are non-standard or have special argument
conventions:

varray(

argument)

Equivalent to but faster than a number of
v3d()
calls.
The argument is a list (or tuple) of points.
Each point must be a tuple of coordinates
(x, y, z) or (x, y).
The points may be 2- or 3-dimensional but must all have the
same dimension.
Float and int values may be mixed however.
The points are always converted to 3D double precision points
by assuming z = 0.0 if necessary (as indicated in the man page),
and for each point
v3d()
is called.

nvarray(

)

Equivalent to but faster than a number of
n3f
and
v3f
calls.
The argument is an array (list or tuple) of pairs of normals and points.
Each pair is a tuple of a point and a normal for that point.
Each point or normal must be a tuple of coordinates
(x, y, z).
Three coordinates must be given.
Float and int values may be mixed.
For each pair,
n3f()
is called for the normal, and then
v3f()
is called for the point.

vnarray(

)

Similar to
nvarray()
but the pairs have the point first and the normal second.

An interface to OpenGL is also available;
see information about the
PyOpenGL project online at
http://pyopengl.sourceforge.net/. This may be a
better option if support for SGI hardware from before
about 1996 is not required.