My first go-to would be to try
cmds.file(new=True, force=True) instead of
cmds.delete(), does that work for you?
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/f960c514-f7c1-4ca0-9334-3ed56e41982dn%40googlegroups.com.