mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
Python3 porting: adoptation SMESH dump python functionality.
This commit is contained in:
parent
78be86e48b
commit
21c9336a4d
@ -185,7 +185,7 @@ namespace {
|
|||||||
_AString comment;
|
_AString comment;
|
||||||
|
|
||||||
_pyID obj = cmd->GetObject();
|
_pyID obj = cmd->GetObject();
|
||||||
if ( obj.Search( "print " ) == 1 )
|
if ( obj.Search( "print(" ) == 1 )
|
||||||
return; // print statement
|
return; // print statement
|
||||||
|
|
||||||
if ( !obj.IsEmpty() && obj.Value( obj.Length() ) == ')' )
|
if ( !obj.IsEmpty() && obj.Value( obj.Length() ) == ')' )
|
||||||
@ -688,7 +688,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
|
|||||||
_AString newCmd = indent + tab + ( aCommand->GetString().ToCString() + indent.Length() );
|
_AString newCmd = indent + tab + ( aCommand->GetString().ToCString() + indent.Length() );
|
||||||
_AString pasCmd = indent + tab + "pass"; // to keep valid if newCmd is erased
|
_AString pasCmd = indent + tab + "pass"; // to keep valid if newCmd is erased
|
||||||
_AString excStr = indent + "except:";
|
_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 ));
|
myCommands.insert( --myCommands.end(), new _pyCommand( tryStr, myNbCommands ));
|
||||||
aCommand->Clear();
|
aCommand->Clear();
|
||||||
|
@ -58,7 +58,7 @@ using SMESH::TVar;
|
|||||||
static void addErrorCode(const char* thePyCommand)
|
static void addErrorCode(const char* thePyCommand)
|
||||||
{
|
{
|
||||||
TPythonDump() << "if (isDone != 1):";
|
TPythonDump() << "if (isDone != 1):";
|
||||||
TPythonDump() << "\tprint '" << thePyCommand << " :', pattern.GetErrorCode()";
|
TPythonDump() << "\tprint('" << thePyCommand << " :', pattern.GetErrorCode())";
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user