Merge ssh://ssh.dcc.fc.up.pt:31064/home/vsc/yap
This commit is contained in:
@@ -62,13 +62,11 @@ static void *py_open(VFS_t *me, const char *name, const char *io_mode,
|
||||
st->user_name = TermOutStream;
|
||||
} else if (strcmp(name, "sys.stderr") == 0) {
|
||||
st->user_name = TermErrStream;
|
||||
} else if (strcmp(name, "input") == 0) {
|
||||
pystream = PyObject_Call(pystream, PyTuple_New(0), NULL);
|
||||
} else {
|
||||
st->user_name = YAP_MkAtomTerm(st->name);
|
||||
}
|
||||
// we assume object is already open, so there is no need to open it.
|
||||
if (PyCallable_Check(pystream))
|
||||
st->u.private_data = PyObject_Call(pystream, PyTuple_New(0), NULL);
|
||||
else
|
||||
st->u.private_data = pystream;
|
||||
st->vfs = me;
|
||||
python_release_GIL(ctk);
|
||||
|
@@ -69,10 +69,10 @@ nb_setval(jupyter_cell, false),
|
||||
).
|
||||
streams(true) :-
|
||||
nb_setval(jupyter_cell, true),
|
||||
open('/python/input', read, _Input, [alias(user_input),bom(false)]),
|
||||
% open('/python/input', read, _Input, [alias(user_input),bom(false)]),
|
||||
open('/python/sys.stdout', append, _Output, [alias(user_output)]),
|
||||
open('/python/sys.stderr', append, _Error, [alias(user_error)]),
|
||||
set_prolog_flag(user_input,_Input),
|
||||
% set_prolog_flag(user_input,_Input),
|
||||
set_prolog_flag(user_output,_Output),
|
||||
set_prolog_flag(user_error,_Error).
|
||||
|
||||
|
Reference in New Issue
Block a user