Skip to content

Commit

Permalink
revert file handle change back to path argument
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgessinger committed Oct 3, 2024
1 parent d311643 commit 3c45762
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Examples/Python/src/Output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@

#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/stl/filesystem.h>

namespace Acts {
class TrackingGeometry;
Expand Down Expand Up @@ -136,11 +137,8 @@ void addOutput(Context& ctx) {
}

py::class_<IVisualization3D>(m, "IVisualization3D")
.def("write", [](const IVisualization3D& self, const py::object& arg) {
std::stringstream ss;
self.write(ss);
arg.attr("write")(ss.str());
});
.def("write", py::overload_cast<const std::filesystem::path&>(
&IVisualization3D::write, py::const_));

{
using Writer = ActsExamples::ObjTrackingGeometryWriter;
Expand Down

0 comments on commit 3c45762

Please sign in to comment.