#6900: Sage pexpect problems - suggestion to use upstream release
-------------------------+--------------------------------------------------
Reporter: pcpa | Owner: boothby
Type: enhancement | Status: new
Priority: major | Milestone:
Component: notebook | Keywords: pexpect
Reviewer: | Author:
Merged: |
-------------------------+--------------------------------------------------
Since pexpect is a very important package, I would like to point one
problem that happens when DOT_SAGE is set to a long pathname, causing the
SaveWorkspace("/path/to/$DOT_SAGE/gap/workspace-ext");
command in interfaces/gap.py fail (and possibly others).
Sample test case to reproduce the problem:
% mkdir -p
/tmp/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/.sage
<<make sure DOT_SAGE will point to that directory>>
% sage
<<exit sage>>
% ls
/tmp/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/0123456789/.sage/gap/
README.txt
<<change DOT_SAGE to something like just /tmp/0123456789/>>
% sage
<<exit sage>>
% ls /tmp/0123456789/.sage/gap
README.txt workspace-1328071335
The problem is due to the command having more then 80 characters.
Currently sage uses pexpect-2.0 (patchlevel 4). And this is also one
special case in my rpm packages of sage, because if using the latest
upstream, in my case:
% rpm -q python-pexpect
python-pexpect-2.4-1mdv2010.0
it works correctly in the terminal interface, but doesn't work correctly
in the notebook interface.
A quick and dirty way to test a newer pexpect would be:
% mkdir $HOME/tmp/sage-pexpect
% mv $SAGE_ROOT/lib/python/site-
packages/{ANSI,FSM,pexpect,pxssh,screen}.py $HOME/tmp/sage-pexpect
% cp newer-python-pexpect/{ANSI,FSM,pexpect,pxssh,screen}.py
$SAGE_ROOT/lib/python/site-packages
% sage
sage: notebook()
After starting the notebook, and using a newer pexpect, try some command
that causes a background processes to be created, like the first singular
example in the tutorial.
A screenshot of the problem, that happens the first time a background
process is started is:
http://img134.imageshack.us/img134/557/sagewithnewerpexpect1.jpg
but, as also shown in the screenshot, in subsequent evaluations, it works
correctly in the notebook.
Since it always works correct in the terminal interface of sage, I
suspect it is an issue in the notebook/worksheet code. And in that case,
it actually may be a different way to debug problems in the sage pexpect
interface (also a suggestion :-)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6900>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---