Re: Connecting to gnuplot with Popen?
Anton81 [EMAIL PROTECTED] writes: Hi Anton, here is a little snippet using os.popen: Unfortunately I'm having more problem getting the output from Gnuplot, which I'd like to examine for error messages and settings of options. If you must roll your own, look at standard module subprocess. John -- http://mail.python.org/mailman/listinfo/python-list
Re: Connecting to gnuplot with Popen?
Hi Anton, here is a little snippet using os.popen: Unfortunately I'm having more problem getting the output from Gnuplot, which I'd like to examine for error messages and settings of options. Anton -- http://mail.python.org/mailman/listinfo/python-list
Re: Connecting to gnuplot with Popen?
Anton81 a écrit : Hi, it seems to be a FAQ, but I still haven't found a solution. I want to control gnuplot with a python program. The following at least gives me the gnuplot output: Unless you absolutely need to write your own code, you should try: http://gnuplot-py.sourceforge.net/ A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list
Connecting to gnuplot with Popen?
Hi, it seems to be a FAQ, but I still haven't found a solution. I want to control gnuplot with a python program. The following at least gives me the gnuplot output: subp=Popen(gnuplot,stdin=None,stderr=PIPE,stdout=PIPE) ... subp.stderr.readline() even though I'm not sure how to check if no more lines can be read with readline() so that it doesn't block. But after the script has finished, the console doesn't show me the characters I type. However, as soon as I try: subp=Popen(gnuplot,stdin=PIPE,stderr=PIPE,stdout=PIPE) ... subp.stderr.readline() the program hangs. What's wrong? Anton -- http://mail.python.org/mailman/listinfo/python-list
Re: Connecting to gnuplot with Popen?
On Thu, 30 Mar 2006 12:59:01 +0200, Anton81 [EMAIL PROTECTED] wrote: it seems to be a FAQ, but I still haven't found a solution. I want to control gnuplot with a python program ... Unfortunately, I don't know how to solve your problem, but try this: http://gnuplot-py.sourceforge.net/ Regards, Dan -- Dan Sommers http://www.tombstonezero.net/dan/ I wish people would die in alphabetical order. -- My wife, the genealogist -- http://mail.python.org/mailman/listinfo/python-list
Re: Connecting to gnuplot with Popen?
I want to control gnuplot with a python program. Hi Anton, here is a little snippet using os.popen: import os gp = os.popen('gnuplot -persist', 'w') print gp, set yrange [-300:300] for n in range(300): print gp, plot %i*cos(x)+%i*log(x+10) % (n,150-n) Regards, mawe -- http://mail.python.org/mailman/listinfo/python-list