X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=Noyau%2FN_OPS.py;h=3b77056a8b03eeb6f26118945f38e9207e33344e;hb=9f4ff7ed9afd87c96e11d61e442e39e5511f60d1;hp=e368d32eaddfcb09a4607d12a68bc3992f8c49a3;hpb=16d5922e798b1254eb558678612711d72ed38b32;p=tools%2Feficas.git diff --git a/Noyau/N_OPS.py b/Noyau/N_OPS.py index e368d32e..3b77056a 100644 --- a/Noyau/N_OPS.py +++ b/Noyau/N_OPS.py @@ -1,4 +1,4 @@ -# -*- coding: iso-8859-1 -*- +# coding=utf-8 # Copyright (C) 2007-2013 EDF R&D # # This library is free software; you can redistribute it and/or @@ -16,10 +16,17 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -from N_utils import import_object -class OPS: +from __future__ import absolute_import +try : + from builtins import object +except : + pass +from .N_utils import import_object + + +class OPS(object): + """Wrapper to ops functions. This allows to import them only when they are needed.""" @@ -33,8 +40,9 @@ class OPS: return func(*args, **kwargs) -# utilisé par exemple par des macros où tout est fait dans l'init. +# utilisé par exemple par des macros où tout est fait dans l'init. class NOTHING(OPS): + """OPS which does nothing.""" def __call__(self, macro, *args, **kwargs):