Changeset 8125 for trunk/anuga_core/source/anuga/pmesh/PmwBlt.py
- Timestamp:
- Mar 4, 2011, 2:34:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/pmesh/PmwBlt.py
r3491 r8125 32 32 33 33 import string 34 import types35 34 import Tkinter 36 35 … … 227 226 self._name, 'search', start, end)) 228 227 def set(self, list): 229 if type(list) != types.TupleType:228 if not isinstance(list, tuple): 230 229 list = tuple(list) 231 230 self.tk.call(self._name, 'set', list) … … 315 314 def axis_configure(self, axes, option=None, **kw): 316 315 # <axes> may be a list of axisNames. 317 if type(axes) == types.StringType:316 if isinstance(axes, basestring): 318 317 axes = [axes] 319 318 subcommand = (self._w, 'axis', 'configure') + tuple(axes) … … 443 442 def element_configure(self, names, option=None, **kw): 444 443 # <names> may be a list of elemNames. 445 if type(names) == types.StringType:444 if isinstance(names, basestring): 446 445 names = [names] 447 446 subcommand = (self._w, 'element', 'configure') + tuple(names) … … 505 504 def pen_configure(self, names, option=None, **kw): 506 505 # <names> may be a list of penNames. 507 if type(names) == types.StringType:506 if isinstance(names, basestring): 508 507 names = [names] 509 508 subcommand = (self._w, 'pen', 'configure') + tuple(names) … … 544 543 def marker_configure(self, names, option=None, **kw): 545 544 # <names> may be a list of markerIds. 546 if type(names) == types.StringType:545 if isinstance(names, basestring): 547 546 names = [names] 548 547 subcommand = (self._w, 'marker', 'configure') + tuple(names) … … 649 648 def tab_configure(self, tabIndexes, option=None, **kw): 650 649 # <tabIndexes> may be a list of tabs. 651 if type(tabIndexes) in (types.StringType, types.IntType):650 if isinstance(tabIndexes, (basestring, int)): 652 651 tabIndexes = [tabIndexes] 653 652 subcommand = (self._w, 'tab', 'configure') + tuple(tabIndexes)
Note: See TracChangeset
for help on using the changeset viewer.