From: Michael H. <mh...@al...> - 2010-07-19 11:35:30
|
Milan SKOCIC wrote: > I'm student and I use often Gnuplot to plot data and different > functions. That's why I decided to write a front-end with Python & > PyGTK. > > The gnuplot.py module is very useful but reading the > documentation, I didn't find how to catch errors given by gnuplot (for > example: "undefined variable t"). > > Does someone know how to do that? Currently, Gnuplot.py does not even read the output of gnuplot, let alone try to understand errors that it writes to its output. Presumably one would have to open a two-way connection to gnuplot then listen for such messages on the gnuplot process's stdout and/or stderr, and it would probably require a little bit of intelligence to distinguish error messages from simple informational messages. If this were implemented it would open the way to doing a couple of other useful things, like reading the output from gnuplot "fit" commands. FWIW, I think PyGTK is a better choice than tkinter, as it is more modern, has more features, and looks much better. Most people probably install using a package manager, in which case installing PyGTK should be an insignificant amount of work. Michael |