Frame work for simple physics web applications


R

Rick Muller

I'd like to use my webserver to distribute some simple python physics
apps. Ideally, I'd like to use some simple form to input a few pieces
of data, call a python program, and return some image from a plot or
some other rendering. This is easy to do using CGI, but I was
wondering whether anyone on the list could recommend that would look a
little more polished and professional.

Let's say I want to input a wave vector k, and then input a plot of
sin(k*x). I would like to have a simple form input for k, and then
display an image of the plot. What I'm doing is a little more varied
than this, but the common thread is that in each application I need to
input several pieces of data and then display some image. I can
probably think of 20 different applications right off the bat that I'd
like to deploy.

The idea behind this is to put together some simple toy models for
quantum computing qubits that my experimental collaborators can play
with without having to install Python, NumPy, and MatPlotLib
themselves. (I understand, of course, that such an installation might
be "good for them", but I'd rather not fight that battle just now.)

I could, of course, write a Jython applet for this, but this would
require my re-learning how to use the Java API, and it has been a few
years for me.

Do any of the AJAX frameworks for Python compare in simplicity to
writing a simple CGI script? I've been impressed with web.py, since it
seems pretty easy to use, but I would go to the trouble of learning
one of the bigger frameworks if they would provide a more elegant
solution.

My web skillz are obviously several years out of date, so I'd like
some guidance on the best way to update them.

Thanks in advance,

Rick
 
Ad

Advertisements

G

globalrev

I'd like to use my webserver to distribute some simple python physics
apps. Ideally, I'd like to use some simple form to input a few pieces
of data, call a python program, and return some image from a plot or
some other rendering. This is easy to do using CGI, but I was
wondering whether anyone on the list could recommend that would look a
little more polished and professional.

Let's say I want to input a wave vector k, and then input a plot of
sin(k*x). I would like to have a simple form input for k, and then
display an image of the plot. What I'm doing is a little more varied
than this, but the common thread is that in each application I need to
input several pieces of data and then display some image. I can
probably think of 20 different applications right off the bat that I'd
like to deploy.

The idea behind this is to put together some simple toy models for
quantum computing qubits that my experimental collaborators can play
with without having to install Python, NumPy, and MatPlotLib
themselves. (I understand, of course, that such an installation might
be "good for them", but I'd rather not fight that battle just now.)

I could, of course, write a Jython applet for this, but this would
require my re-learning how to use the Java API, and it has been a few
years for me.

Do any of the AJAX frameworks for Python compare in simplicity to
writing a simple CGI script? I've been impressed with web.py, since it
seems pretty easy to use, but I would go to the trouble of learning
one of the bigger frameworks if they would provide a more elegant
solution.

My web skillz are obviously several years out of date, so I'd like
some guidance on the best way to update them.

Thanks in advance,

Rick

www.vpython.org might be what you are looking for.
 
R

Rick Muller

www.vpython.orgmight be what you are looking for.

Except, if I'm not mistaken, vpython isn't a web framework. It would
work if I wanted to write some python scripts and have other people
run them, but I want to run everything through a web page, so I don't
have to worry about installing python on everyone's computer and
distributing updates of all of my scripts.
 
Ad

Advertisements

S

Stef Mientki

Rick said:
Except, if I'm not mistaken, vpython isn't a web framework. It would
work if I wanted to write some python scripts and have other people
run them, but I want to run everything through a web page, so I don't
have to worry about installing python on everyone's computer
So what should the students use when they want to explore quantum
computing outside the scope you're offering ?
C++, MatLab, LabView perhaps, this looks to me like an unique
opportunity to promote Python.
and
distributing updates of all of my scripts.
I'm not familiar with this, but isn't it possible to run scripts from a
website locally ?

cheers,
Stef
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top