-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python shell handling is broken. #3
Comments
One reason the telnet shell is broken is that we have no unit tests for it. Once upon a time, it used to work. |
python results are discarded so it's difficult to test it. Agreed it is broken, but I guess we'll address that more deeply after the demo. |
I sort of got it working
but code like the one u posted with the empty line inside a scope doesn't work |
I stubbed out line 107 of tests/cython/PythonModuleUTest.cxxtest until this issue is resolved. When this bug is fixed, then that line should be enabled again. |
See comments in pull request opencog/atomspace#838
At this time, starting the cogserver, and then
telnet localhost 17001
, entering the python shell, and entering this:produces no output in either the shell or the cogserver (see also issue #2 -- currently prints go to the cogserver; once fixed, prints should go to the shell.) There are also various inconsistencies: running the python shell stand-alone gives this:
after hitting carriage return 3 times. Doing the same in the telnet terminal gives this:
There are also inconsistencies in what python considers to be "legal syntax". For example, the following code, when entered at the python shell, is invalid syntax:
it generates this error:
however, copying that code to a file, say
f.py
and running it as$ python f.py
does not produce any error:running the above code at the telnet prompt does nothing.
I'm not sure quite how to resolve this ... if python itself is not self-consistent with what it considers to be valid syntax, I'm not sure how how to emulate that .. at any rate, the telnet shell is clearly broken.
The text was updated successfully, but these errors were encountered: