import os
import maya.cmds as cmds
class mypars_ts:
def __init__(self):
print "Hello\n"
def testing(*args):
print "Call Came\n"
def window_lod (self):
if cmds.window('ExampleWindow', exists=True):
cmds.deleteUI('ExampleWindow', window=True)
cmds.window( 'ExampleWindow' )
cmds.columnLayout()
cmds.text( label='Size and position the window before closing it.' )
cmds.button( label='Close', command='testing' )
cmds.showWindow( 'ExampleWindow' )
my_calls=mypars_ts()
my_calls.window_lod()
when ever i am trying to execute this code .. i am getting a error
# Error: name 'testing' is not defined
# Traceback (most recent call last):
# File "<maya console>", line 1, in ?
# NameError: name 'testing' is not defined #
but thts already defined
def testing(*args):
print "Call Came\n"
where i am wrong :( can any one help please :(