On 6/4/2010 1:01 PM Hans Georg Schaathun said...
Admittedly not the strongest reason, but yet an important one,
for switching from Matlab to python/numpy/scipy/matplotlib,
is that Matlab is very cumbersome to run in batch.
Now I discover that some of the matplotlib.pyplot functions
(incl. plot and contour) insist on opening an X11 window
(just like Matlab does).
I found the same to be true when running OpenOffice in batch mode.
Ultimately, the following was key to getting things going:
at the shell:
/usr/bin/vncserver :1
then from within python:
XDISPLAY=':1'
cmd='''cd /usr/ftp/CSV && DISPLAY=%s \
/usr/bin/soffice -norecover -nologo -nodefault \
"macro:///Standard.Module1.csvToXLS(%s)"''' \
% (XDISPLAY,csvfile)
dummy = commands.getoutput(cmd)
Then, if it doesn't run to conclusion, you can vnc to :1 and see where
it's stalled out.
HTH,
Emile
--
http://mail.python.org/mailman/listinfo/python-list