This commit is contained in:
Vitor Santos Costa
2018-12-10 22:40:12 +00:00
parent 1797e5132e
commit 18e437f038
5 changed files with 112 additions and 31 deletions

View File

@@ -1,4 +1,16 @@
/**
* @file python.c
*
* @brief data structures and init for Py4YAP library
*
*/
/**
* @defgroup PY4YAP
* @ingroup python
* @brief make Python talk to YAP
* @{
*/
#include "py4yap.h"
#include <VFS.h>
@@ -127,3 +139,5 @@ X_API bool do_init_python(void) {
// python_output();
return true;
}
// @}

View File

@@ -88,11 +88,11 @@ blank(Text) :-
streams(false) :-
close(user_input),
%close(user_input),
close(user_output),
close(user_error).
streams( true) :-
open('/python/input', read, _Input, [alias(user_input),bom(false),script(false)]),
%open('/python/input', read, _Input, [alias(user_input),bom(false),script(false)]),
open('/python/sys.stdout', append, _Output, [alias(user_output)]),
open('/python/sys.stderr', append, _Error, [alias(user_error)]).

View File

@@ -704,7 +704,6 @@ class YAPRun(InteractiveShell):
else:
linec = True
rcell = cell[1:].strip()
print(cell)
try:
[magic,cell] = rcell.split(maxsplit = 1, sep = '\n')
except: