The pymxs Python module provides a wrapper for the MAXScript engine, and exposes virtually all the interfaces, globals, and classes available in MAXScript. The MAXScript help describes all the MAXScript objects and functions available to pymxs, while these topics cover some of the ways Python interoperates with MAXScript.
The pymxs module exposes the MAXScript runtime, and all the global symbols it contains, to Python scripts. The runtime is dynamic, so global objects created in MAXScript are subsequently available to pymxs.runtime.
The names of objects available in the pymxs.runtime module correspond to MAXScript globals. So, for example, to create a teapot you can use the MAXScript Teapot() constructor like this:
>>> import pymxs >>> rt = pymxs.runtime >>> t = rt.Teapot() >>> rt.classOf(t) <GeometryClass<Teapot>>
Both MAXScript print() and assert() functions are disabled and not callable from pymxs.runtime. There are a couple of ways to work around this limitation to send messages to the Listener window. The simplest is to use the standard Python print() function and assert statement.
The pymxs module has a special print_() function that gives you more control over error formatting and threading behavior:
pymxs.print_(msg[, isErr[, [forceOnMainThread]])