[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Axiom-developer] Axiom crashing in Zope-Plone
From: |
Bill Page |
Subject: |
RE: [Axiom-developer] Axiom crashing in Zope-Plone |
Date: |
Sat, 25 Sep 2004 16:22:45 -0400 |
Hans,
I am VERY HAPPY that you are motivated to do this! I would
like to provide you with as much help as I can.
I tried your demo.py program on the axiom-developer.org system
and it works fine. The program and outout is attached below.
As you can see, I only made a simple change to accommodate the
default location of AXIOMsys and the input file.
Although Bob McElrath has written separately about the issue of
programs that produce a large output, I don't think that this is
the problem since the MathAction axiom code already uses the
"fixed runCommand" (makeNonBlocking etc.) that Bob mentions.
Therefore I think the best approach would be to find the
meaning of the EXITSTATUS 139. I will let you know if I find
anything.
Regards,
Bill Page.
--------
address@hidden page]$ cat demo.py
import os
from popen2 import Popen3
axiomTemplate = r""")set output algebra off
)set output tex on
)set message autoload off
)set quit unprotected
integrate(x**2,x)
)quit
"""
LatexWikiHome = ''
axTinput = open ( LatexWikiHome + 'axT.input', 'w' )
axTinput.write(axiomTemplate)
axTinput.close()
cmdLine = r'AXIOMsys < %s ' %(LatexWikiHome + 'axT.input')
def echoWorld():
""" external method calling Popen3 """
p = Popen3 (cmdLine, 1, 4096)
status = p.wait()
p.tochild.close()
out = p.fromchild.read()
p.fromchild.close()
err = ''
if p.childerr: err = p.childerr.read(); p.childerr.close()
error = os.WEXITSTATUS(status) or \
not os.WIFEXITED(status)
if not error: return\
'Output: ' + out +\
'\nWEXITSTATUS: ' + str(os.WEXITSTATUS(status)) +\
'\nWIFEXITED: ' + str(os.WIFEXITED(status))
else: return\
'Error: ' + err +\
'\nOut: ' + out +\
'\nWEXITSTATUS:' + str(os.WEXITSTATUS(status)) +\
'\nWIFEXITED: ' + str(os.WIFEXITED(status))
# For Zope external testing
print echoWorld()
address@hidden page]$ python demo.py
Output: AXIOM Computer Algebra System
Version of Monday June 21, 2004 at 08:34:09
----------------------------------------------------------------------------
-
Issue )copyright to view copyright notices.
Issue )summary for a summary of useful system commands.
Issue )quit to leave AXIOM and return to shell.
----------------------------------------------------------------------------
-
Re-reading compress.daase Re-reading interp.daase
Re-reading operation.daase
Re-reading category.daase
Re-reading browse.daase
(1) -> (1) -> (1) -> (1) -> (1) ->
$$
{1 \over 3} \ {x \sp 3}
\leqno(1)
$$
Type: Polynomial Fraction
Integer
(2) ->
WEXITSTATUS: 0
WIFEXITED: 1
address@hidden page]$
- [Axiom-developer] Axiom crashing in Zope-Plone, Hans Peter Wuermli, 2004/09/25
- Re: [Axiom-developer] Axiom crashing in Zope-Plone, Hans Peter Wuermli, 2004/09/26
- RE: [Axiom-developer] Axiom crashing in Zope-Plone, Bill Page, 2004/09/26
- Re: [Axiom-developer] Axiom crashing in Zope-Plone, Hans Peter Wuermli, 2004/09/26
- Re: [Axiom-developer] Axiom crashing in Zope-Plone, Bob McElrath, 2004/09/26
- Re: [Axiom-developer] Axiom crashing in Zope-Plone, root, 2004/09/26
- Re: [Axiom-developer] Axiom crashing in Zope-Plone, Camm Maguire, 2004/09/26
- Re: [Axiom-developer] Axiom crashing in Zope-Plone, Camm Maguire, 2004/09/28
- Re: [Axiom-developer] Axiom crashing in Zope-Plone, Hans Peter Wuermli, 2004/09/28
- [Axiom-developer] Axiom support with LatexWiki, Bill Page, 2004/09/26