forked from metin2/client
Solution refactoring and restructuring, removed Boost dependency, removed unused tools
This commit is contained in:
25
src/ScriptLib/PythonLauncher.h
Normal file
25
src/ScriptLib/PythonLauncher.h
Normal file
@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
#include <python2.7/frameobject.h>
|
||||
|
||||
#include "../eterBase/Singleton.h"
|
||||
|
||||
class CPythonLauncher : public CSingleton<CPythonLauncher>
|
||||
{
|
||||
public:
|
||||
CPythonLauncher();
|
||||
virtual ~CPythonLauncher();
|
||||
|
||||
void Clear();
|
||||
|
||||
bool Create(const char* c_szProgramName="eter.python");
|
||||
void SetTraceFunc(int (*pFunc)(PyObject * obj, PyFrameObject * f, int what, PyObject *arg));
|
||||
bool RunLine(const char* c_szLine);
|
||||
bool RunFile(const char* c_szFileName);
|
||||
bool RunMemoryTextFile(const char* c_szFileName, UINT uFileSize, const VOID* c_pvFileData);
|
||||
bool RunCompiledFile(const char* c_szFileName);
|
||||
const char* GetError();
|
||||
|
||||
protected:
|
||||
PyObject* m_poModule;
|
||||
PyObject* m_poDic;
|
||||
};
|
Reference in New Issue
Block a user