Fixed non-interactive pylab plotting setup in common.py
[calibcant.git] / calibcant / common.py
index 24e5f1d9449c926c2fbe4ae523c3e4eff553b4ac..2db32e1bc7d23adbcd83f7c15f18ded9c21b1c73 100644 (file)
@@ -29,6 +29,7 @@ VERSION="0.2"
 _flush_plot = None
 _final_flush_plot = None
 _pylab = None
+def _dummy_fn(): pass
 
 def _import_pylab() :
     """Import pylab plotting functions for when we need to plot.  This
@@ -46,12 +47,12 @@ def _import_pylab() :
         if config.PYLAB_INTERACTIVE :
             _flush_plot = _pylab.draw
         else :
-            def _flush_plot () : pass
+            _flush_plot = _pylab.show #_dummy_fn
     if _final_flush_plot == None :
         if config.PYLAB_INTERACTIVE :
             _final_flush_plot = _pylab.draw
         else :
-            _final_flush_plot = _pylab.show
+            _final_flush_plot = _dummy_fn # _pylab.show
 
 def write_array(ofile, array, seperator):
     """Erite an iterable array seperated by seperator.