From: Jean-Philippe ARGAUD Date: Fri, 12 Oct 2012 14:53:33 +0000 (+0200) Subject: Light cleaning of python code after pychecking X-Git-Tag: V6_6_0~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a7daf64b4b1daae056ddc6b3d081467d019c0375;p=modules%2Fadao.git Light cleaning of python code after pychecking --- diff --git a/src/daComposant/daCore/AssimilationStudy.py b/src/daComposant/daCore/AssimilationStudy.py index 0df9ff1..0658b94 100644 --- a/src/daComposant/daCore/AssimilationStudy.py +++ b/src/daComposant/daCore/AssimilationStudy.py @@ -193,8 +193,7 @@ class AssimilationStudy: self.__Y = numpy.matrix( asVector, numpy.float ).T elif asPersistentVector is not None: if type( asPersistentVector ) is list or type( asPersistentVector ) is tuple: - from Persistence import OneVector - self.__Y = OneVector("Observation", basetype=numpy.array) + self.__Y = Persistence.OneVector("Observation", basetype=numpy.array) for y in asPersistentVector: self.__Y.store( y ) else: diff --git a/src/daComposant/daCore/Logging.py b/src/daComposant/daCore/Logging.py index 84ac561..da4c1c8 100644 --- a/src/daComposant/daCore/Logging.py +++ b/src/daComposant/daCore/Logging.py @@ -105,12 +105,12 @@ class Logging: logging.info( "- Scipy "+p.getScipyVersion() ) logging.info( "" ) - def setLogfileLevel(self, level=logging.NOTSET ): - """ - Permet de changer globalement le niveau des messages disponibles. - """ - logging.getLogger().setLevel(level) - +# def setLogfileLevel(self, level=logging.NOTSET ): +# """ +# Permet de changer globalement le niveau des messages disponibles. +# """ +# logging.getLogger().setLevel(level) +# def setLogfile(self, filename=LOGFILE, filemode="w", level=logging.NOTSET): """ Permet de disposer des messages dans un fichier EN PLUS de la console. diff --git a/src/daComposant/daCore/Persistence.py b/src/daComposant/daCore/Persistence.py index 0a877c9..f2251a2 100644 --- a/src/daComposant/daCore/Persistence.py +++ b/src/daComposant/daCore/Persistence.py @@ -382,7 +382,6 @@ class Persistence: persist = False, pause = True, ): - import os # # Vérification de la disponibilité du module Gnuplot try: @@ -497,7 +496,6 @@ class Persistence: """ if self.__dynamic and len(self.__values) < 2: return 0 # - import os self.__g('set title "'+str(self.__title).encode('ascii','replace')) Steps = range(len(self.__values)) self.__g.plot( self.__gnuplot.Data( Steps, self.__values, title=self.__ltitle ) ) @@ -621,7 +619,6 @@ class Persistence: attendant un Return Par défaut, pause = True """ - import os # # Vérification de la disponibilité du module Gnuplot try: diff --git a/src/daComposant/daCore/PlatformInfo.py b/src/daComposant/daCore/PlatformInfo.py index 3b3061c..91dfb5f 100644 --- a/src/daComposant/daCore/PlatformInfo.py +++ b/src/daComposant/daCore/PlatformInfo.py @@ -97,7 +97,7 @@ class PathManagement: Mise à jour du path système pour les répertoires d'outils """ def __init__(self): - import os, sys + import sys parent = os.path.abspath(os.path.join(os.path.dirname(__file__),"..")) self.__paths = {} self.__paths["daExternals"] = os.path.join(parent,"daExternals")