hyperion.ng/include/python/PythonProgram.h
LordGrey 733aa662bf
Refactor Python for 3.12 integration (#1807)
* Correct JS requestConfig call

* Update requestWriteConfig to new API format

* Add hyperion-light and bare-minimum preset scenarios

* Refactor Python

* Windows add bcrypt until mbedtls  is fixed
(https://github.com/Mbed-TLS/mbedtls/pull/9554)

* Corrections

* Use ScreenCaptureKit under macOS 15 and above

* ReSigning macOS package

* Python 3.11.10 test

* Revert "Python 3.11.10 test"

This reverts commit ee921e4f1284fe3d984d9422b24a1c56c6916c21.

* Handle defined exits from python scripts

* Update change.log

* CodeQL findings

---------

Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com>
2024-12-01 17:08:25 +01:00

35 lines
471 B
C++

#pragma once
#include <QByteArray>
#include <QString>
// Python includes
// collide of qt slots macro
#undef slots
#include "Python.h"
#define slots
#include <python/PythonUtils.h>
class Logger;
class PythonProgram
{
public:
PythonProgram(const QString & name, Logger * log);
~PythonProgram();
operator PyThreadState* ()
{
return _tstate;
}
void execute(const QByteArray &python_code);
private:
QString _name;
Logger* _log;
PyThreadState* _tstate;
};