This command returns whether the script is running in published mode (i.e. within an exe). This is generally used when you need to take a different action within a published exe.
# Disable Framerate/Wireframe keys when published to EXE
if viz.res.isPublished():
viz.setOption('viz.default_key.framerate',0)
viz.setOption('viz.default_key.poly_mode',0)