X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_2smeshpy.cxx;h=96287f87270a8d406bcb3e73d2414c8b1f15df7e;hp=7b957b6a36cc1fc663b8ef1bd24a88576ffba5f1;hb=bd7477efc255f965c479d88d1be1ee3dbf4aa760;hpb=1d429d8caf426206a25d847a599a654aa34fa718 diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index 7b957b6a3..96287f872 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -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();