You can manipulate the main window object in runtime by calling methods. The main windows is always accessible by the "mainwindow" object.

addvisualwindowbydef None addvisualwindowbydef(JSONDef) Create a new visual window (browser or client). Definitions supported can be found on the respective objects.
isvalidwindowname bool Check if the name has been used already and return true if not.
generatewindowname string Makes a random valid windows name that can be used if none given.

The method list. Proper documentation and examples found in individual documents.