I tried this standalone script to turn off all layers in the MXD:
print "This script turns off the following layers:" try: arcpy except NameError: import arcpy mxd = arcpy.mapping.MapDocument(r"PATH") for lyr in arcpy.mapping.ListLayers(mxd): print lyr.name lyr.visible = False mxd.save
It is adapted from the script mentioned for the Python window here:
The standalone one I created for IDLE from this, above, did not affect the visibility status of any layers when I opened the MXD afterward to check. This is strange because running the same script within the Python window turned off all the layers for me.