From 05816c80452b08d87780ab5818f0fe8b3ceedad6 Mon Sep 17 00:00:00 2001 From: Serge Rehbinder Date: Fri, 19 Feb 2016 14:27:53 +0100 Subject: [PATCH] Add hooks --- salomeTools.py | 128 ++++++++++++++++++++++++++++++++++++++++-------- src/__init__.py | 3 ++ 2 files changed, 110 insertions(+), 21 deletions(-) diff --git a/salomeTools.py b/salomeTools.py index 65d909e..57a0cfc 100755 --- a/salomeTools.py +++ b/salomeTools.py @@ -44,6 +44,12 @@ import config #es.install() gettext.install('salomeTools', os.path.join(satdir, 'src', 'i18n')) +# The possible hooks : +# pre is for hooks to be executed before commands +# post is for hooks to be executed after commands +C_PRE_HOOK = "pre" +C_POST_HOOK = "post" + def find_command_list(dirPath): ''' Parse files in dirPath that end with .py : it gives commands list @@ -63,11 +69,16 @@ lCommand = find_command_list(cmdsdir) # Define all possible option for salomeTools command : sat