From: ageay Date: Fri, 13 Jul 2012 09:46:22 +0000 (+0000) Subject: PYTHONSTARTUP read even in python -i mode to ease usage. X-Git-Tag: V6_main_FINAL~588 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b606d0880d5782637d2bf1c7db958fecf5d4b345;p=tools%2Fmedcoupling.git PYTHONSTARTUP read even in python -i mode to ease usage. --- 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 +%}