Commit 958f05a6 authored by Giacomo Fiorin's avatar Giacomo Fiorin
Browse files

Allow requesting Python interpreter without having to define a function just for that

parent c9bc1413
Loading
Loading
Loading
Loading
+7 −0
Changes for src/python.cpp: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -60,6 +60,13 @@ bool Python::is_enabled() const {

/* ---------------------------------------------------------------------- */

void Python::request()
{
  if (!impl) init();
}

/* ---------------------------------------------------------------------- */

void Python::command(int narg, char **arg)
{
  if(!impl) init();
+1 −0
Changes for src/python.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ public:
  char * long_string(int ifunc);

  bool is_enabled() const;
  void request();

private:
  PythonInterface * impl;