resonance 1.0.1
Loading...
Searching...
No Matches
pyshell.h
Go to the documentation of this file.
1#pragma once
2
3#include "script/cxx/dict.h"
4#include "script/cxx/object.h"
6
7class HxStr;
8
22class PyShell {
23private:
24 PyInterpreter mInterpreter; // +0x00
25
26public:
43
52
67 Py::Object Eval(const HxStr &source, int nStartSymbol);
68
82
99 void ReportError(const HxStr &context, int bWithTraceback);
100
110};
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Lifetime of the embedded interpreter, the first member of PyShell.
Definition pyinterpreter.h:14
void ReportError(const HxStr &context, int bWithTraceback)
Report a script failure and halt the machine.
void RunMasterInitScript()
Run the master script.
Py::Dict mDict
Namespace every script runs in, which is the dictionary of __main__.
Definition pyshell.h:109
~PyShell()
Release the namespace dictionary, and then shut the interpreter down through the interpreter member.
Py::Object Eval(const HxStr &source, int nStartSymbol)
Compile and run script text in the shared namespace.
PyShell()
Bring the interpreter up and prepare the script environment.
Handle on a Python dictionary.
Definition dict.h:30
Reference-counted handle on any Python object, and the root of the PyCXX object hierarchy.
Definition object.h:42