# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2021 CEA/DEN, EDF R&D
+# Copyright (C) 2007-2024 CEA, EDF
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
from MEDLoader import *
from math import pi,e,sqrt
+import sys
def WriteInTmpDir(func):
def decaratedFunc(*args,**kwargs):
with tempfile.TemporaryDirectory() as tmpdirname:
os.chdir(tmpdirname)
ret = func(*args,**kwargs)
+ os.chdir(os.path.dirname(tmpdirname))
pass
return ret
return decaratedFunc