MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / runScript

Method runScript

source/MREmbeddedPython/MREmbeddedPython.cpp:75–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75bool EmbeddedPython::runScript( const std::filesystem::path& path )
76{
77 if ( !isAvailable() || !isPythonScript( path ) )
78 return false;
79
80 std::ifstream ifs( path );
81 std::ostringstream oss;
82 oss << ifs.rdbuf();
83 ifs.close();
84 std::string str = oss.str();
85 return runString( str );
86}
87
88bool EmbeddedPython::isPythonScript( const std::filesystem::path& path )
89{

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected