Salome HOME
Minor print update
[modules/adao.git] / src / daComposant / daCore / Interfaces.py
index faa1c2fa65c7eed2399a4b90cc66a750749863e5..8dfc2b83d2e941cb4d2fe989610df48a37c0cd76 100644 (file)
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# Copyright (C) 2008-2018 EDF R&D
+# Copyright (C) 2008-2019 EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -118,11 +118,11 @@ class _TUIViewer(GenericCaseViewer):
             for k in __keys:
                 __v = __local[k]
                 if __v is None: continue
-                if   k == "Checked"   and not __v: continue
-                if   k == "Stored"    and not __v: continue
-                if   k == "ColMajor"  and not __v: continue
-                if   k == "InputAsMF" and not __v: continue
-                if   k == "AvoidRC"   and     __v: continue
+                if   k == "Checked"              and not __v: continue
+                if   k == "Stored"               and not __v: continue
+                if   k == "ColMajor"             and not __v: continue
+                if   k == "InputFunctionAsMulti" and not __v: continue
+                if   k == "AvoidRC"              and     __v: continue
                 if   k == "noDetails":             continue
                 if isinstance(__v,Persistence.Persistence): __v = __v.values()
                 if callable(__v): __text = self._missing%__v.__name__+__text
@@ -393,7 +393,7 @@ class _SCDViewer(GenericCaseViewer):
                     __text += "%s_config['From'] = '%s'\n"%(__command,__f)
                     __text += "%s_config['Data'] = %s\n"%(__command,__v)
                     __text = __text.replace("''","'")
-                elif __k in ('Stored', 'Checked', 'ColMajor', 'InputAsMF'):
+                elif __k in ('Stored', 'Checked', 'ColMajor', 'InputFunctionAsMulti'):
                     if bool(__v):
                         __text += "%s_config['%s'] = '%s'\n"%(__command,__k,int(bool(__v)))
                 elif __k in ('AvoidRC', 'noDetails'):
@@ -516,6 +516,7 @@ class ImportFromScript(object):
             __basename = os.path.basename(__filename).rstrip(".py")
         else:
             __basename = __filename.rstrip(".py")
+        PlatformInfo.checkFileNameImportability( __basename+".py" )
         self.__basename = __basename
         self.__filenspace = __import__(__basename, globals(), locals(), [])
         self.__filestring = open(__filename,'r').read()
@@ -567,7 +568,7 @@ class ImportDetector(object):
             mimetypes.add_type('text/csv', '.csv')
             mimetypes.add_type('text/tab-separated-values', '.tsv')
     #
-    # File related f
+    # File related tests
     # ------------------
     def is_local_file(self):
         if os.path.isfile(os.path.realpath(self.__url)):
@@ -671,6 +672,7 @@ class ImportFromFile(object):
         self.__url = ImportDetector( Filename, Format)
         self.__url.raise_error_if_not_local_file()
         self._filename = self.__url.get_absolute_name()
+        PlatformInfo.checkFileNameConformity( self._filename )
         #
         self._format = self.__url.get_comprehensive_mime()
         #
@@ -936,4 +938,4 @@ class ImportScalarLinesFromFile(ImportFromFile):
 
 # ==============================================================================
 if __name__ == "__main__":
-    print('\n AUTODIAGNOSTIC \n')
+    print('\n AUTODIAGNOSTIC\n')