virtual streams

This commit is contained in:
Vítor Santos Costa
2018-05-24 21:45:38 +01:00
parent 8607aee725
commit 7c934d3f40
9 changed files with 28 additions and 51 deletions

View File

@@ -1,18 +0,0 @@
:- use_module(library(python)).
:- if( current_prolog_flag(apple, true) ).
:- putenv( 'LC_CTYPE', 'en_us:UTF-8').
plot_inline :-
X := self.inline_plotting,
nb_setval(inline, X ),
X = true,
!,
:= (
import( matplotlib ),
matplotlib.use( `nbagg` )
).
:- endif.

View File

@@ -72,7 +72,7 @@ streams(true) :-
% 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).