Error in sys.exitfunc:
Traceback (most recent call last):
File "/mount/cello/home/ysaito/pychart/pychart/canvas.py", line 60, in _exit
can.close()
File "/nfs/cello-home/home/ysaito/pychart/pychart/pngcanvas.py", line 22, in close
self.start_gs(gs_args)
File "/nfs/cello-home/home/ysaito/pychart/pychart/gs_frontend.py", line 58, in start_gs
self.__write_contents(self.pipe_fp)
File "/nfs/cello-home/home/ysaito/pychart/pychart/gs_frontend.py", line 33, in __write_contents
fp.writelines(self.__output_lines)
IOError: [Errno 32] Broken pipe
For both cases, the easiest solution is to use the --output option:
python foo.py --output=blah.pdfor environment variable PYCHART_OPTIONS:
% PYCHART_OPTIONS="output=blah.pdf" % export PYCHART_OPTIONS % python foo.py
from pychart import * theme.use_color = 1 theme.reinitialize() ....