| 375 | } |
| 376 | |
| 377 | std::string PythonEngine::getBasicPreamble() |
| 378 | { |
| 379 | std::string cmd = R"python(import sys |
| 380 | sys.argv.clear() |
| 381 | sys.argv.append("energyplus") |
| 382 | )python"; |
| 383 | fs::path programDir = FileSystem::getParentDirectoryPath(FileSystem::getAbsolutePath(FileSystem::getProgramPath())); |
| 384 | fs::path const pathToPythonPackages = programDir / "python_lib"; |
| 385 | std::string sPathToPythonPackages = std::string(pathToPythonPackages.string()); |
| 386 | std::replace(sPathToPythonPackages.begin(), sPathToPythonPackages.end(), '\\', '/'); |
| 387 | cmd += EnergyPlus::format("sys.path.insert(0, \"{}\")\n", sPathToPythonPackages); |
| 388 | return cmd; |
| 389 | } |
| 390 | |
| 391 | std::string PythonEngine::getTclPreppedPreamble(std::vector<std::string> const &python_fwd_args) |
| 392 | { |
nothing calls this directly
no test coverage detected