#ifndef PYTHONEMBED_H
#define PYTHONEMBED_H

#include <QTextEdit>
#include <QObject>

class PythonEmbed : public QObject {
    Q_OBJECT

public:
    PythonEmbed(QTextEdit* outputWidget, QObject* parent = nullptr);
    ~PythonEmbed();

    void runScript(const QString& scriptContent);
    void stopScript();

private:
    void handlePythonError(const char* context);

    QTextEdit* m_outputWidget;
    bool m_initialized = false;
};

#endif // PYTHONEMBED_H

