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 5 4900
On Thu, 30 Mar 2006 12:59:01 +0200,
Anton81 <fo***@anton.e4ward.com> 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
> 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
> 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
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.
Anton81 <fo***@anton.e4ward.com> 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Rama Calaga |
last post by:
Hi, I use both python and gnuplot a lot, but I am
unable to find a way to embed gnuplot "window/canvas" into tkinter. BLT option in
PMW is not so powerful and not so great, any suggestions ??
...
|
by: Cedric |
last post by:
This is a 3 weeks old problem, but having found a solution (and having
looked for one here, finding only this message), I'm replying now.
From: Jive (someone@microsoft.com)
Subject: Upgrade...
|
by: syd |
last post by:
I don't even know where to begin. This is just bizarre. I just picked
up the Gnuplot.py module (a light interface to gnuplot commands) and
was messing around with it today.
I've got a tiny...
|
by: Joseph Suprenant |
last post by:
Hello all,
I have a C++ program, it does some calculations on things and then
prints out a file in the format in which GNUPLOT can use. So my question is
how would i call GNUPLOT from my C++...
|
by: Nicola Kaiser |
last post by:
Hi,
I´m using Gnuplot via gnuplot.py and I´m looking for a way to get the
plotting output (terminal set to png in my case) piped in a string
instead of to stdout or a file.
Is there any...
|
by: bwaha |
last post by:
I've posted this question to comp.graphics.apps.gnuplot too but given that
this python group may also comprise a lot of gnuplot users, and is far more
active, I've posted this question here too. My...
|
by: Peter Beattie |
last post by:
I am trying to plot something in gnuplot 4.2 using co-ordinates a Python
2.5 program computes. Here's what I'm doing:
pyfrom subprocess import *
pyplot = Popen("c:/progs/gp/bin/wgnuplot.exe",...
|
by: mkxc |
last post by:
hi, i'm new here and would like to know how to use gnuplot. I have an assignment which require me to read and convert a .txt file into an array. The txt file contains numbers/integers/floats. I'm...
|
by: Blah |
last post by:
I'm trying to use the system() in a C++ program to execute gnuplot on
a file of data on OSX and have the graph pop up but so far the only
thing I've managed to do is get gnuplot to open.
as I...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |