Salome HOME
reindent + copyright + merge manuel avec la V9_dev sauf repertoires metier
[tools/eficas.git] / Noyau / N_utils.py
index a0415268258bb0763df100ac90499c6570c2c442..5e1ba24a9004291cbfb991d1434e77c7d81fbebb 100644 (file)
@@ -1,5 +1,5 @@
 # coding=utf-8
-# Copyright (C) 2007-2017   EDF R&D
+# Copyright (C) 2007-2021   EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -27,24 +27,23 @@ from __future__ import absolute_import
 from __future__ import print_function
 from __future__ import division
 try :
-   from builtins import str
-   from builtins import object
+    from builtins import str
+    from builtins import object
 except :
-   pass
+    pass
 import sys
 
 # Modules EFICAS
 from .N_Exception import AsException
 from .N_types import isInt, isFloat, isComplex, isStr, isSequence, isASSD
 from .strfunc import getEncoding
-import six
 
 SEP = '_'
 
 try :
-  cur_frame = sys._getframe
+    cur_frame = sys._getframe
 except :
-  print ('pb avec la version de python pour cur_frame = sys._getframe')
+    print ('pb avec la version de python pour cur_frame = sys._getframe')
 
 def calleeWhere(niveau=4):
     """
@@ -57,6 +56,7 @@ def calleeWhere(niveau=4):
         # Python 2.7 compile function does not accept unicode filename, so we encode it
         # with the current locale encoding in order to have a correct traceback.
         # Here, we convert it back to unicode.
+        import six
         filename = six.text_type(frame.f_code.co_filename, getEncoding())
         return frame.fLineNo, filename, frame.f_code.co_firstlineno, frame.f_locals
     except: