Salome HOME
Merge Python 3 porting.
[modules/smesh.git] / src / SMESH_I / SMESH_2smeshpy.cxx
index 7b957b6a36cc1fc663b8ef1bd24a88576ffba5f1..96287f87270a8d406bcb3e73d2414c8b1f15df7e 100644 (file)
@@ -185,7 +185,7 @@ namespace {
     _AString comment;
 
     _pyID obj = cmd->GetObject();
-    if ( obj.Search( "print " ) == 1 )
+    if ( obj.Search( "print(" ) == 1 )
       return; // print statement
 
     if ( !obj.IsEmpty() && obj.Value( obj.Length() ) == ')' )
@@ -683,7 +683,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
       _AString newCmd = indent + tab + ( aCommand->GetString().ToCString() + indent.Length() );
       _AString pasCmd = indent + tab + "pass"; // to keep valid if newCmd is erased
       _AString excStr = indent + "except:";
-      _AString msgStr = indent + "\tprint '"; msgStr += method + "() failed. Invalid file name?'";
+      _AString msgStr = indent + "\tprint('"; msgStr += method + "() failed. Invalid file name?')";
 
       myCommands.insert( --myCommands.end(), new _pyCommand( tryStr, myNbCommands ));
       aCommand->Clear();