This series of tutorials introduces the fundamentals of using Python in Maya.
********************* empty window script **********************
import maya.cmds as cmds
class MR_Window(object):
#constructor
def __init__(self):
self.window = "MR_Window"
self.title = "Cube Creator"
self.size = (400, 400)
close old window is open
if cmds.window(self.window, exists = True):
cmds.deleteUI(self.window, window=True)
#create new window
self.window = cmds.window(self.window, title=self.title, widthHeight=self.size)
#display new window
cmds.showWindow()
myWindow = MR_Window()