If your problem is plotting graphics from numerical simulations perhaps this
fragment of code from my learning python and mod_python may help you.
def show(req):
req.content_type="image/png"
put,get=os.popen4('echo "set term png size 400,400 ; set out ;
splot(sin(x)*cos(y))" | gnuplot')
img=g
Here is my code in cgi.
=
#!/usr/bin/python
print "Content-Type:text/plain\n\n"
# python code here (create a simulation or graphics)
The python code is ok when I run it in executable file
.py.
Friend told me to change the def
Hallo wrote:
> hi all,
>
> I have tried making a simulation with python. I want it to be shown at
> a web. It is ok when I run it. so, I decided using cgi. but, when I try
> it using a web browser it doesn't work.
>
> Is it problem in the header or something else ?
>
> If there are any suggest
hi all,
I have tried making a simulation with python. I want it to be shown at
a web. It is ok when I run it. so, I decided using cgi. but, when I try
it using a web browser it doesn't work.
Is it problem in the header or something else ?
If there are any suggestions about this problem, I will