From http://tech-artists.org/forum/showthread.php?2587-How-to-disable-Maya-data-loss-warning-on-Open
import pymel.core as pm pm.openFile(filePath, prompt=False)