yap
This commit is contained in:
@@ -2040,7 +2040,7 @@ class InteractiveShell(SingletonConfigurable):
|
||||
list where you want the completer to be inserted."""
|
||||
|
||||
newcomp = types.MethodType(completer,self.Completer)
|
||||
self.Completer.matchers.insert(pos,newcomp)
|
||||
self.Completer.matches.insert(pos,newcomp)
|
||||
|
||||
def set_completer_frame(self, frame=None):
|
||||
"""Set the frame of the completer."""
|
||||
|
@@ -38,7 +38,7 @@ jupyter_cell( _Caller, _, Line ) :-
|
||||
blank( Line ),
|
||||
!.
|
||||
jupyter_cell(Caller, _, Line ) :-
|
||||
Query = Caller,
|
||||
Query = Caller,
|
||||
catch(
|
||||
python_query(Query,Line),
|
||||
error(A,B),
|
||||
@@ -67,7 +67,7 @@ jupyter_consult(Cell) :-
|
||||
(
|
||||
Options = [],
|
||||
open_mem_read_stream( Cell, Stream),
|
||||
load_files(user:'jupyter cell',[stream(Stream)| Options])
|
||||
load_files(Stream,[stream(Stream)| Options])
|
||||
),
|
||||
error(A,B),
|
||||
(close(Stream), system_error(A,B))
|
||||
@@ -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)]).
|
||||
|
||||
|
@@ -739,12 +739,13 @@ class YAPRun(InteractiveShell):
|
||||
# def f(self, cell, state):
|
||||
# state = self.jupyter_query( cell )
|
||||
|
||||
# run the new command using the given tracer
|
||||
#
|
||||
# tracer.runfunc(f,self,cell,state)
|
||||
self.jupyter_query( cell )
|
||||
# state = tracer.runfunc(jupyter_query( self, cell ) )
|
||||
# run the new command using the given tracer
|
||||
#
|
||||
# tracer.runfunc(f,self,cell,state)
|
||||
self.jupyter_query( cell )
|
||||
# state = tracer.runfunc(jupyter_query( self, cell ) )
|
||||
self.shell.last_execution_succeeded = True
|
||||
result.info += [self.answer]
|
||||
result.result = True
|
||||
except Exception as e:
|
||||
has_raised = True
|
||||
@@ -773,7 +774,7 @@ class YAPRun(InteractiveShell):
|
||||
self.shell.execution_count += 1
|
||||
|
||||
self.yapeng.mgoal(streams(False),"user", True)
|
||||
return result
|
||||
return result.result
|
||||
|
||||
def clean_end(self,s):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user