From b606d0880d5782637d2bf1c7db958fecf5d4b345 Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 13 Jul 2012 09:46:22 +0000 Subject: [PATCH] PYTHONSTARTUP read even in python -i mode to ease usage. --- src/MEDCoupling_Swig/MEDCouplingCommon.i | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index 3db9f1178..ee7c9011f 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -6792,3 +6792,11 @@ namespace ParaMEDMEM } }; } + +%pythoncode %{ +import os +__filename=os.environ.get('PYTHONSTARTUP') +if __filename and os.path.isfile(__filename): + execfile(__filename) + pass +%} -- 2.39.2