Salome HOME
[PY3] 2to3 results
[modules/smesh.git] / src / Tools / Verima / ajoutEnreg.py
index 5f227debf30506358083198bb998d3914a859dbe..57d18dcc60a1afe41d840a8613ad1a2301a39ca2 100755 (executable)
@@ -6,7 +6,7 @@ installDir=os.path.join(rep,'..')
 sys.path.insert(0,installDir)
 
 from qtsalome import *
-from Base.dataBase import Base
+from .Base.dataBase import Base
 
 def completeDatabase(fichier,table,enregistrement):
       maBase=Base(fichier)
@@ -18,8 +18,8 @@ def completeDatabase(fichier,table,enregistrement):
       nbCols=model.columnCount() -1
       if table == "TableGroupesRef" : nbCols==nbCols+1
       if len(enregistrement) != nbCols  :
-         print "mauvais nb de valeurs"
-         print "Attention, ne pas renter d'Id"
+         print("mauvais nb de valeurs")
+         print("Attention, ne pas renter d'Id")
       if table == "TableGroupesRef" : matable.insereLigne(enregistrement)
       else : matable.insereLigneAutoId(enregistrement)
       maBase.close()
@@ -33,10 +33,10 @@ if __name__ == "__main__":
      p.add_option('-t',dest='table',help='nom de la table a completer')
      options, args = p.parse_args()
      if  options.table==None : 
-         print  "table obligatoire"
+         print("table obligatoire")
          exit()
      if  options.table not in ("TableMaillages","TableMailleurs","TableGroupesRef","TableVersions") : 
-         print  "la table doit etre : TableMaillages ou TableMailleurs ou TableGroupesRef ou TableVersions" 
+         print("la table doit etre : TableMaillages ou TableMailleurs ou TableGroupesRef ou TableVersions") 
          exit()
      enregistrement=tuple(args)
      completeDatabase(options.database,options.table,enregistrement)