-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyrun.h
More file actions
33 lines (28 loc) · 720 Bytes
/
pyrun.h
File metadata and controls
33 lines (28 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef PYRUN_H
#define PYRUN_H
//se crea un entorno para cargar modulos en python
#include <QString>
#include <QStringList>
#include <QVariant>
namespace PyRun
{
enum State
{
PythonUninitialized,
PythonInitialized,
AppModuleLoaded
};
enum Resultado
{
CannotLoadModule,
CannotConvertArgument,
CallFailed,
CannotFindFunction,
FailedToLoad,
Success
};
//bool loadModule(const QString &modulePath, const QString &moduleName, const QString &functionName, const QStringList &args=QStringList());
QPair<int,QVariant> loadModule(const QString &modulePath, const QString &moduleName, const QString &functionName, const QStringList &args=QStringList());
State init();
}
#endif // PYRUN_H