atexit.register() functions not being called from Maya on exit?

atexit.register() functions not being called from Maya on exit?

w.david.lewis
Explorer Explorer
383 Views
0 Replies
Message 1 of 1

atexit.register() functions not being called from Maya on exit?

w.david.lewis
Explorer
Explorer
Does the atexit package work from within Maya?

I've tried the straightforward approach:
import sendit

import atexit
atexit.register(sendit.sendit)

where the sendit.sendit() function just sends me an e-mail.

I don't get an e-mail from either Maya2011 or 2012.

There's a finalize() function registered with atexit in Autodesk\Maya20nn\Python\lib\site-packages\maya\app\startup\basic.py, so you'd think it would work. However the finalize() method doesn't actually do anything, so no one probably noticed it not working.

I've also tried putting my sendit() call in the Maya finalize() method and still no results.

Is this just broken or is there some trick to getting it to work?

Thanks!

--- David
0 Likes
384 Views
0 Replies
Replies (0)