ultimatepp/bazaar/PyCon/PyCon.h
kohait 6ecf478516 bazaar: Python: some python test cases, very basic and alpha
git-svn-id: svn://ultimatepp.org/upp/trunk@3319 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2011-03-30 21:04:06 +00:00

35 lines
702 B
C++

#ifndef _PyCon_PyCon_h_
#define _PyCon_PyCon_h_
#include <Core/Core.h>
using namespace Upp;
#include <Python/Python.h>
#include <LogCtrl/LogCtrl.h>
void InitLogger();
class PyCon
{
public:
static PyObject* ToStdOut(PyObject* self, PyObject* pArgs);
static PyObject* ToStdErr(PyObject* self, PyObject* pArgs);
static void Init();
static void Enable(bool b = true);
static void Disable() { Enable(false); }
static bool IsEnabled() { return enabled; }
static void SetStream(Stream& _ps) { ps = &_ps; }
static Stream& GetStream() { return (ps)?(*ps):(StdLog()); }
protected:
static PyMethodDef m[];
static bool enabled;
static Stream* ps;
};
#endif