# HG changeset patch
# User Mike Hansen <mhansen@gmail.com>
# Date 1338237279 25200
# Node ID 0b9f4d9ebf2068732f2526d27f6d449cf8424b25
# Parent 6a453352445704485c5ee59eb269dafc209035de
#12009: optional package gnuplotpy1.8.spkg causes test failure on sage4.7.2
diff git a/sage/interfaces/gnuplot.py b/sage/interfaces/gnuplot.py
a

b


18  18  #***************************************************************************** 
19  19  
20  20  import os, time 
21   
22   try: 
23   import Gnuplot as GP 
24   except ImportError: 
25   # Functionality just won't be available 
26   pass 
27   
28  21  from sage.structure.sage_object import SageObject 
29  22  
30  23  class Gnuplot(SageObject): 
… 
… 

36  29  
37  30  def gnuplot(self): 
38  31  try: 
39   return self.__gnuplot 
 32  return self._gnuplot 
40  33  except AttributeError: 
41  34  try: 
42   self.__gnuplot = GP.Gnuplot() 
43   return self.__gnuplot 
44   except NameError: 
 35  import Gnuplot as GP 
 36  self._gnuplot = GP.Gnuplot() 
 37  return self._gnuplot 
 38  except ImportError: 
45  39  raise RuntimeError, "Install the gnuplotpy Python module." 
46  40  
47  41  def __call__(self, line): 