I have a button that triggers a script that can take anywhere from 1 to 3 
seconds to execute. 

I'd like to show some immediate feedback to the user when the button is 
pressed, and then another message when the script is complete. However any 
UI command I include at the beginning of my script wrapper won't be visible 
until the script is complete.

Is there a convention for dealing with this? (preferably without spinning 
off another thread)

## EXAMPLE
import pymel.core as pm

def script_wrapper():
    pm.text(label='Starting script')
    long_running_script() # could take up to 3 seconds to execute
    pm.text(label='Script complete')

pm.button(label='Run Script', command=script_wrapper)


-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to