mirror of
https://github.com/worldforge/cyphesis
synced 2026-08-13 12:26:04 -04:00
2009-01-30 Al Riddoch <alriddoch@googlemail.com>
* rulesets/Python_API.cpp, rulesets/Python_API.h: Hack in a quick function for executing python commands. * server/CommPythonClient.cpp: Pass input from the client straight into the python interpretter and see what happens.
This commit is contained in:
parent
ac7665e3c0
commit
0bbbfe7dae
4 changed files with 27 additions and 1 deletions
|
|
@ -21,6 +21,8 @@
|
|||
#include "CommServer.h"
|
||||
#include "HttpCache.h"
|
||||
|
||||
#include "rulesets/Python_API.h"
|
||||
|
||||
static const bool debug_flag = false;
|
||||
|
||||
CommPythonClient::CommPythonClient(CommServer & svr, int fd) :
|
||||
|
|
@ -53,6 +55,7 @@ int CommPythonClient::read()
|
|||
std::cout << "[NOT]" << std::endl << std::flush;
|
||||
} else {
|
||||
std::cout << m_incoming << std::endl << std::flush;
|
||||
run_python_command(m_incoming.c_str());
|
||||
m_incoming.clear();
|
||||
}
|
||||
} else if (next == '\r') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue