controls/DebugVariablePanel/DebugVariableGraphicViewer.py
changeset 2450 5024c19ca8f0
parent 2440 45b43f275ca1
child 3303 0ffb41625592
equal deleted inserted replaced
2449:b0560adec4b7 2450:5024c19ca8f0
    23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    24 
    24 
    25 
    25 
    26 from __future__ import absolute_import
    26 from __future__ import absolute_import
    27 from __future__ import division
    27 from __future__ import division
    28 from types import TupleType
       
    29 from time import time as gettime
    28 from time import time as gettime
    30 from cycler import cycler
    29 from cycler import cycler
    31 
    30 
    32 import numpy
    31 import numpy
    33 import wx
    32 import wx
   156         message = None
   155         message = None
   157 
   156 
   158         # Check that data is valid regarding DebugVariablePanel
   157         # Check that data is valid regarding DebugVariablePanel
   159         try:
   158         try:
   160             values = eval(data)
   159             values = eval(data)
   161             if not isinstance(values, TupleType):
   160             if not isinstance(values, tuple):
   162                 raise ValueError
   161                 raise ValueError
   163         except Exception:
   162         except Exception:
   164             message = _("Invalid value \"%s\" for debug variable") % data
   163             message = _("Invalid value \"%s\" for debug variable") % data
   165             values = None
   164             values = None
   166 
   165