Re: [sage-devel] doctesting tab completion

2017-09-30 Thread Dima Pasechnik
On Saturday, September 30, 2017 at 12:49:28 PM UTC+1, Dima Pasechnik wrote: > > oh yes, ipython 5+ uses threads in prompt handling. > > thus an extension can be started in a tab completion thread and then > called in the main thread, or the other way around. > At least I know that from

Re: [sage-devel] doctesting tab completion

2017-09-30 Thread Dima Pasechnik
oh yes, ipython 5+ uses threads in prompt handling. thus an extension can be started in a tab completion thread and then called in the main thread, or the other way around. in some cases initialisation from a non-main thread might not even be possible, due to lacking functionalty. A good

Re: [sage-devel] doctesting tab completion

2017-09-28 Thread Volker Braun
On Thursday, September 28, 2017 at 9:26:57 AM UTC+2, Dima Pasechnik wrote: > > basically, the crash comes from importing being done in a separate thread > rather than the main > thread. So an alternative way to trigger this would be to use the > appropriate multprocessing/threading module. >

Re: [sage-devel] doctesting tab completion

2017-09-28 Thread Dima Pasechnik
On Thursday, September 28, 2017 at 6:54:59 AM UTC+1, David Roe wrote: > > I'm not sure, but maybe you can find the iPython call which is doing the > completion. Something like > > sage: from IPython import get_ipython > sage: ip = get_ipython() > sage: completer = ip.Completer > sage:

Re: [sage-devel] doctesting tab completion

2017-09-27 Thread David Roe
I'm not sure, but maybe you can find the iPython call which is doing the completion. Something like sage: from IPython import get_ipython sage: ip = get_ipython() sage: completer = ip.Completer sage: completer.complete('sage.interfaces.maxima_lib import') But this doesn't work for me. David On

[sage-devel] doctesting tab completion

2017-09-27 Thread Dima Pasechnik
How does one write a doctest for tab completion on the command line? I don't care for the output, I just need to check there is no crash, as in https://trac.sagemath.org/ticket/23700#comment:11 sage: from sage.libs.ecl import * sage: sage.interfaces.maxima_lib import causes a segfault in ECL