MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / exec_file

Method exec_file

ngstd/python_ngstd.hpp:112–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110 }
111
112 virtual void exec_file(const string fstr) {
113 string output;
114 ifstream file;
115 file.open(fstr.c_str());
116 if (file.is_open())
117 {
118 while (!file.eof())
119 {
120 std::string line;
121 std::getline(file, line);
122 output += line.append("\n");
123 }
124 }
125 file.close();
126 exec(output);
127 }
128};
129
130

Callers 1

NGS_LoadPyFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected