Open linas opened 4 years ago
@noskill @vsbogd fyi
See also opencog/cogserver#2 which might be a duplicate
Why cogserver uses PythonEval from atomspace? It can just call PyRun_InteractiveLoopFlags
Why?
History, I suppose. And simplicity. The Shell
class is a generic class that takes one line of text input from, runs it, and then returns a text string. So it will work for "anything", and attaching it to PythonEval was easy.
We don''t quite have a good way of handing off the whole interactive loop to some handler; this is mostly due to the complexity of using boost::asio
(which I'm unhappy about, because its .. complex, hard to use, and buggy.) I don't think it has an API where it can just hand off a socket to someone else to manage.
The cogserver python shell was used to communicate with ROS (since ROS is 90% python) but I don't think there are many (or any) unit tests for it.
Python printing in the cogserver shell is (was??) broken, due to changes in PythonEval in the atomspace. For details, see opencog/cogserver#3