All classes should at least subclass 'object' to avoid being old-style classes.
authorW. Trevor King <wking@drexel.edu>
Thu, 17 Dec 2009 19:43:34 +0000 (14:43 -0500)
committerW. Trevor King <wking@drexel.edu>
Thu, 17 Dec 2009 19:43:34 +0000 (14:43 -0500)
See, for example
  http://www.python.org/doc/newstyle/
  http://www.python.org/doc/2.5.2/ref/node33.html

17 files changed:
hooke/libhooke.py
hooke/libhookecurve.py
hooke/plugin/autopeak.py
hooke/plugin/cut.py
hooke/plugin/fit.py
hooke/plugin/flatfilts.py
hooke/plugin/generalclamp.py
hooke/plugin/generaltccd.py
hooke/plugin/generalvclamp.py
hooke/plugin/macro.py
hooke/plugin/massanalysis.py
hooke/plugin/multidistance.py
hooke/plugin/pcluster.py
hooke/plugin/procplots.py
hooke/plugin/superimpose.py
hooke/plugin/tutorial.py
hooke/plugin/viewer.py

index 69101c8faffd5da0edf06e57530e10344b013dc6..247df8b11dcb49ff8e918e708ba412e31ccd304b 100755 (executable)
@@ -25,7 +25,7 @@ import csv
 HOOKE_VERSION=['0.8.3_devel', 'Seinei', '2008-04-16']
 WX_GOOD=['2.6','2.8']
 
 HOOKE_VERSION=['0.8.3_devel', 'Seinei', '2008-04-16']
 WX_GOOD=['2.6','2.8']
 
-class PlaylistXML:
+class PlaylistXML(object):
         '''
         This module allows for import/export of an XML playlist into/out of a list of HookeCurve objects
         '''
         '''
         This module allows for import/export of an XML playlist into/out of a list of HookeCurve objects
         '''
@@ -132,7 +132,7 @@ class PlaylistXML:
             outfile.close()
 
 
             outfile.close()
 
 
-class HookeConfig:
+class HookeConfig(object):
     '''
     Handling of Hooke configuration file
 
     '''
     Handling of Hooke configuration file
 
@@ -248,7 +248,7 @@ class HookeConfig:
         pass
 
 
         pass
 
 
-class ClickedPoint:
+class ClickedPoint(object):
     '''
     this class defines what a clicked point on the curve plot is
     '''
     '''
     this class defines what a clicked point on the curve plot is
     '''
index 5b83e0cacdb6792ac295cd62fe0a4845a3ef6d3f..0bb4a499dd652b87acf1bbe1e0b82adaa2da0d7c 100755 (executable)
@@ -22,7 +22,7 @@ class HookeCurve(object):
         return False
 
 
         return False
 
 
-class Driver:
+class Driver(object):
     '''
     Base class for file format drivers.
 
     '''
     Base class for file format drivers.
 
@@ -50,7 +50,7 @@ class Driver:
         return [dummy_default]
 
 
         return [dummy_default]
 
 
-class PlotObject:
+class PlotObject(object):
 
     def __init__(self):
 
 
     def __init__(self):
 
index c5aac95fe83b348438a192d0cc4123eeba15655e..17a30ed3120df8e21814f82fb336fa9cbdc451d3 100644 (file)
@@ -14,7 +14,7 @@ import warnings
 warnings.simplefilter('ignore',np.RankWarning)
 
 
 warnings.simplefilter('ignore',np.RankWarning)
 
 
-class autopeakCommands:
+class autopeakCommands(object):
 
     def do_autopeak(self,args):
         '''
 
     def do_autopeak(self,args):
         '''
index b84e50750ad3045e4ef75fd372e4aba3f01f8cda..41cbedb0b130b3038a3ab252f776a241a40e5f74 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
 # -*- coding: utf-8 -*-
-class cutCommands:
+class cutCommands(object):
 
     def _plug_init(self):
         self.cut_basecurrent=None
 
     def _plug_init(self):
         self.cut_basecurrent=None
index 3193faa2c404eef892b9635f1993e96d8d357e09..7ab6037645a64fc44568da6c625926652d5a1961 100755 (executable)
@@ -27,7 +27,7 @@ global events_from_fit
 events_from_fit=Queue.Queue() #GUI ---> CLI COMMUNICATION
 
 
 events_from_fit=Queue.Queue() #GUI ---> CLI COMMUNICATION
 
 
-class fitCommands:
+class fitCommands(object):
 
     def _plug_init(self):
         self.wlccurrent=None
 
     def _plug_init(self):
         self.wlccurrent=None
index a2cc5694a01ef3c6263ef14138f695adcc7a594f..09dc3dbe9a1038c4752c9816639f36570de9a252 100755 (executable)
@@ -24,7 +24,7 @@ import libpeakspot as lps
 import libhookecurve as lhc
 
 
 import libhookecurve as lhc
 
 
-class flatfiltsCommands:
+class flatfiltsCommands(object):
 
     def _plug_init(self):
         #configurate convfilt variables
 
     def _plug_init(self):
         #configurate convfilt variables
@@ -364,7 +364,7 @@ class flatfiltsCommands:
 
 #########################
 #HANDLING OF CONFIGURATION FILE
 
 #########################
 #HANDLING OF CONFIGURATION FILE
-class ConvfiltConfig:
+class ConvfiltConfig(object):
     '''
     Handling of convfilt configuration file
 
     '''
     Handling of convfilt configuration file
 
index 327e5851ed8a063f082ea1f610958a00a1f9041b..e3c6fe1c2e3fc05fa9dcaa8ab5139b0e12c660dc 100644 (file)
@@ -9,7 +9,7 @@ import libhookecurve as lhc
 wxversion.select(WX_GOOD)
 from wx import PostEvent
 
 wxversion.select(WX_GOOD)
 from wx import PostEvent
 
-class generalclampCommands:
+class generalclampCommands(object):
 
     def plotmanip_clamp(self, plot, current, customvalue=False):
         '''
 
     def plotmanip_clamp(self, plot, current, customvalue=False):
         '''
index 1b9504923093f0e2c703a31a0ae31469afacd6ca..395da08ecf3ed131f158eb8c7c4daa8c4b7ac8be 100644 (file)
@@ -4,7 +4,7 @@ generaltccd.py
 General utilities for TCCD stuff
 '''
 
 General utilities for TCCD stuff
 '''
 
-class generaltccdCommands:
+class generaltccdCommands(object):
 
     def plotmanip_threshold(self, plot, current, customvalue=False):
         '''
 
     def plotmanip_threshold(self, plot, current, customvalue=False):
         '''
index 32beaf0b33b3bbb06ee5f7324117c12931dcfd4a..28131503c3c96c3b400a8b72dd2010cec9385064 100644 (file)
@@ -18,7 +18,7 @@ import warnings
 warnings.simplefilter('ignore',np.RankWarning)
 
 
 warnings.simplefilter('ignore',np.RankWarning)
 
 
-class generalvclampCommands:
+class generalvclampCommands(object):
 
     def _plug_init(self):
         self.basecurrent=None
 
     def _plug_init(self):
         self.basecurrent=None
index 800d3112bcb9de37fe131f5530656dce23cb1d74..88d13a50b654adba3e7b1c01f6a9f7987182c204 100644 (file)
@@ -10,7 +10,7 @@ import libinput as linput
 import os.path
 import string
 
 import os.path
 import string
 
-class macroCommands:
+class macroCommands(object):
 
        currentmacro=[]
        pause=0
 
        currentmacro=[]
        pause=0
index 6fcb03d87f325914c985f03541ba07e6f8b5b122..0a36657ff996a4c7d1678b02d84babe242cd6d58 100644 (file)
@@ -16,7 +16,7 @@ import numpy as np
 
 import csv
 
 
 import csv
 
-class massanalysisCommands:
+class massanalysisCommands(object):
 
     def _plug_init(self):
         self.mass_variables={}
 
     def _plug_init(self):
         self.mass_variables={}
index adda783354cd50eec690a65b80570f24be808620..517a286ad638aa66b5379ec3c7571b019c3883f7 100644 (file)
@@ -13,7 +13,7 @@ import warnings
 warnings.simplefilter('ignore',np.RankWarning)
 
 
 warnings.simplefilter('ignore',np.RankWarning)
 
 
-class multidistanceCommands:
+class multidistanceCommands(object):
 
     def do_multidistance(self,args):
      '''
 
     def do_multidistance(self,args):
      '''
index 5f51939453bd3884c56747e1490a772d3c8b29b5..2e166201dbf13f051e40e21fa846f09bafde2388 100644 (file)
@@ -15,7 +15,7 @@ import warnings
 warnings.simplefilter('ignore',np.RankWarning)
 
 
 warnings.simplefilter('ignore',np.RankWarning)
 
 
-class pclusterCommands:
+class pclusterCommands(object):
 
     def _plug_init(self):
         self.clustplot1=None
 
     def _plug_init(self):
         self.clustplot1=None
index 68e7f8ff82ca0ae42e8965bf684738a0a0229ecd..612ae0b1b10b9a206a7880e24695270ae619880a 100755 (executable)
@@ -15,7 +15,7 @@ import scipy as sp
 import scipy.signal
 import copy
 
 import scipy.signal
 import copy
 
-class procplotsCommands:
+class procplotsCommands(object):
 
     def _plug_init(self):
         pass
 
     def _plug_init(self):
         pass
index ce10e9904ebc1a4e38d999310afaa5ea8d0eccb0..41083f68651f0f9a03d7fd16b856d19e6c950759 100644 (file)
@@ -6,7 +6,7 @@ from wx import PostEvent
 import libhookecurve as lhc
 from numpy import arange, mean
 
 import libhookecurve as lhc
 from numpy import arange, mean
 
-class superimposeCommands:
+class superimposeCommands(object):
 
     def _plug_init(self):
         self.imposed=[]
 
     def _plug_init(self):
         self.imposed=[]
index ad7a6feba03ae4c45e5e2b1e8f2b7fadacb17a0d..50a0d78a71b0f9b971a336d673182debf9a42d36 100755 (executable)
@@ -19,7 +19,7 @@ SYNTAX OF DATA TYPE DECLARATION:
 '''
 
 
 '''
 
 
-class tutorialCommands:
+class tutorialCommands(object):
     '''
     Here we define the class containing all the Hooke commands we want to define
     in the plugin.
     '''
     Here we define the class containing all the Hooke commands we want to define
     in the plugin.
index 961b6a2eba35c6b5d940820e2e7d24f6603dae00..7a6881dd25e4c7a81adb3322e705090a389ebf64 100644 (file)
@@ -10,7 +10,7 @@ This program is released under the GNU General Public License version 2.
 import libviewer as lview
 import libinput as linput
 
 import libviewer as lview
 import libinput as linput
 
-class viewerCommands:
+class viewerCommands(object):
        
     def _plug_init(self):
         self.viewerlist=[]
        
     def _plug_init(self):
         self.viewerlist=[]