Skip to content

Commit 27347a4

Browse files
committed
Fix python embeddable
1 parent a585858 commit 27347a4

File tree

1 file changed

+4
-5
lines changed
  • examples/graphics/source/examples

1 file changed

+4
-5
lines changed

examples/graphics/source/examples/Python.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,16 @@ class PythonDemo : public yup::Component
3939
locals["yup"] = pybind11::module_::import (yup::PythonModuleName);
4040
locals["this"] = pybind11::cast (this);
4141

42-
auto result = engine.runScript (yup::String (R"(
42+
auto script = yup::String (R"(
4343
import sys
4444
print("Scripting YUP!")
4545
this.backgroundColor = yup.Color.opaqueRandom()
4646
this.repaint();
47-
)")
48-
.dedentLines(),
49-
locals);
47+
)");
5048

49+
auto result = engine.runScript (script.dedentLines(), locals);
5150
if (result.failed())
52-
std::cout << result.getErrorMessage();
51+
YUP_DBG (result.getErrorMessage());
5352
};
5453
addAndMakeVisible (runPython);
5554
}

0 commit comments

Comments
 (0)