# 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
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):
"""
# 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: