Any way to turn off interactive mode?

My default mode of matplotlib is interactive mode,
but in some programs I like to turn off the interactive model temporarily
so postpone drawing until I call show(), because of performance concern.
Any way for swith the mode in a script? Thanks in advance.

Daehyok Shin