fix backcall
This commit is contained in:
parent
868961ebb5
commit
45439b8b86
@ -1529,6 +1529,11 @@ extern bool Yap_HasException(void);
|
||||
extern yap_error_descriptor_t *Yap_GetException();
|
||||
extern void Yap_PrintException(yap_error_descriptor_t *i);
|
||||
INLINE_ONLY bool Yap_HasException(void) {
|
||||
extern yap_error_number Yap_MathException__(USES_REGS1);
|
||||
yap_error_number me;
|
||||
if ((me = Yap_MathException__(PASS_REGS1)) && LOCAL_ActiveError->errorNo != YAP_NO_ERROR) {
|
||||
LOCAL_ActiveError->errorNo = me;
|
||||
}
|
||||
return LOCAL_ActiveError->errorNo != YAP_NO_ERROR;
|
||||
}
|
||||
|
||||
|
@ -85,6 +85,7 @@ typedef struct vfs {
|
||||
/// in this space, usual w,r,a,b flags plus B (store in a buffer)
|
||||
bool (*close)(int sno); /// close the object
|
||||
int (*get_char)(int sno); /// get an octet from the stream
|
||||
int (*get_wchar)(int sno); /// get an octet from the stream
|
||||
int (*peek_char)(int sno); /// unget an octet from the stream
|
||||
int (*peek_wchar)(int sno); /// unget an octet from the stream
|
||||
int (*put_char)(int sno, int ch); /// output an octet to the stream
|
||||
|
@ -7,7 +7,7 @@
|
||||
from __future__ import print_function
|
||||
|
||||
# the name of the package
|
||||
name = 'ipykernel'
|
||||
name = 'yap_kernel'
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Minimal Python version sanity check
|
||||
|
@ -13,7 +13,7 @@ events and the arguments which will be passed to them.
|
||||
This API is experimental in yap_ipython 2.0, and may be revised in future versions.
|
||||
"""
|
||||
|
||||
from yap_ipython.core.backcall import callback_prototype
|
||||
from backcall import callback_prototype
|
||||
|
||||
|
||||
class EventManager(object):
|
||||
|
@ -727,7 +727,6 @@ class YAPRun:
|
||||
self.result.result = False
|
||||
has_raised = False
|
||||
try:
|
||||
builtin_mod.input = self.shell.sys_raw_input
|
||||
self.yapeng.mgoal(streams(True),"user", True)
|
||||
if cell.strip('\n \t'):
|
||||
#create a Trace object, telling it what to ignore, and whether to
|
||||
|
@ -166,14 +166,14 @@ class YAPKernel(KernelBase):
|
||||
"""
|
||||
self._allow_stdin = allow_stdin
|
||||
|
||||
# if PY3:
|
||||
# self._sys_raw_input = builtin_mod.input
|
||||
# builtin_mod.input = self.raw_input
|
||||
# else:
|
||||
# self._sys_raw_input = builtin_mod.raw_input
|
||||
# self._sys_eval_input = builtin_mod.input
|
||||
# builtin_mod.raw_input = self.raw_input
|
||||
# builtin_mod.input = lambda prompt='': eval(self.raw_input(prompt))
|
||||
if PY3:
|
||||
self._sys_raw_input = builtin_mod.input
|
||||
builtin_mod.input = self.raw_input
|
||||
else:
|
||||
self._sys_raw_input = builtin_mod.raw_input
|
||||
self._sys_eval_input = builtin_mod.input
|
||||
builtin_mod.raw_input = self.raw_input
|
||||
builtin_mod.input = lambda prompt='': eval(self._sys_input(prompt))
|
||||
self._save_getpass = getpass.getpass
|
||||
getpass.getpass = self.getpass
|
||||
|
||||
|
Reference in New Issue
Block a user