Index: /issm/trunk-jpl/src/m/classes/pairoptions.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/pairoptions.py	(revision 26908)
+++ /issm/trunk-jpl/src/m/classes/pairoptions.py	(revision 26909)
@@ -11,11 +11,16 @@
 
     def __init__(self, *arg):  # {{{
-        self.functionname = ''
+        #self.functionname = ''
         self.list = OrderedDict()
 
         #get calling function name
-        import inspect
-        if len(inspect.stack()) > 1:
-            self.functionname = inspect.stack()[1][3]
+        #import inspect
+        #if len(inspect.stack()) > 1:
+        #self.functionname = inspect.stack()[1][3]
+        import traceback
+        try:
+            self.functionname = traceback.extract_stack(limit=2)[0][2]
+        except IndexError:
+            pass  #this is probably similar to the previous if treatment (but faster)
 
         #initialize list
@@ -98,6 +103,7 @@
         """
 
-        disp(['WARNING: pairoptions::displayunused is not yet implemented'])
+        print('WARNING: pairoptions::displayunused is not yet implemented')
     # }}}
+
     def exist(self, field):  # {{{
         """EXIST - check if the option exists
