Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: Basic Python Questions - Oct. 31, 2013 Date: Sun, 3 Nov 2013 23:16:11 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 26 Message-ID: References: <031120131018099327%JimSGibson@gmail.com> NNTP-Posting-Host: c-24-118-110-103.hsd1.mn.comcast.net X-Trace: reader1.panix.com 1383520571 265 24.118.110.103 (3 Nov 2013 23:16:11 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Sun, 3 Nov 2013 23:16:11 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) Xref: csiph.com comp.lang.python:58418 On 2013-11-03, Jim Gibson wrote: > In article , E.D.G. > wrote: > >> My main, complex programs won't be run at Web sites. They will >> instead continue to be available as downloadable exe programs. The CGI (or >> whatever) programming work would involve relatively simple programs. But >> they would need to be able to generate charts that would be displayed on Web >> pages. That sounds like it is probably fairly easy to do using Python. A >> Perl - Gnuplot combination is also supposed to be able to do that. But so >> far I have not seen any good explanations for how to actually get Gnuplot to >> run as a callable CGI program. So other programs such as Python are being >> considered. > > One way to generate plot within a CGI program is this: > > 1. Write a file with gnuplot commands (e.g., 'gnuplot.cmd') that set > the output device to a graphics file of some format (e.g., PNG), > generate a plot, and quit gnuplot. Or you can use the pygnuplot module which handles much of that for y0ou. http://pygnuplot.sourceforge.net/ -- Grant