Re: how to show simulation at web

2005-06-07 Thread Apoptozinho
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

Re : how to show simulation at web

2005-06-06 Thread Titi Anggono
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

Re: how to show simulation at web

2005-06-06 Thread Robert Kern
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

how to show simulation at web

2005-06-06 Thread Hallo
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