[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] Axiom crashing in Zope-Plone

From: Hans Peter Wuermli
Subject: [Axiom-developer] Axiom crashing in Zope-Plone
Date: Sat, 25 Sep 2004 17:08:12 +0200
User-agent: KMail/1.6.2


I wonder if someone with the new Zope-Plone-LatexWiki experience can help me. 

Having been enthusiastic about MathAction I tried to set it up locally on my 
local computer, too, using the ZWiki and LatexWiki files on Strangely enough Axiom is not 
rendered, as the method runCommand() in fails when run from 
inside Zope. Testing the method externally either within a or as a 
standalone method, does not produce errors and works as expected. 

I checked with a lot of analoguous situations, first suspecting missing access 
rights, but "wrapping", for example, an executable, a segfaulting executable 
or a psql script run fine, standalone or within zope as external methods.

I can boil down the error to the external method "" at the end of the 
mail, which is similar to the runCommand() in 

Zope is version 2.6.4; python used is version 2.2 and it all runs on a Debian 
sarge system.

The exit codes for Popen3 when run from Zope are:


Thank you for any help.

Cheers, H.P.

import os
from popen2 import Popen3

axiomTemplate = r""")set output algebra off
)set output tex on
)set message autoload off
)set quit unprotected

LatexWikiHome = '/usr/lib/zope/lib/python\

axTinput = open ( LatexWikiHome + 'axT.input', 'w' )

cmdLine = r'export AXIOM=/usr/lib/axiom-0.20040831;\
export PATH=$AXIOM/bin:$PATH;\
AXIOMsys < %s ' %(LatexWikiHome + 'axT.input')

def echoWorld():
    """ external method calling Popen3 """
    p = Popen3 (cmdLine, 1, 4096)
    status = p.wait()
    out =
    err = ''
    if p.childerr: err =; 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()

reply via email to

[Prev in Thread] Current Thread [Next in Thread]