HTML - WEB FORM running PYTHON SCRIPT

D

Dimitrios Xenakis

Hi there, i would like to ask.. i need to create an html webpage and bring that live on the internet via my host service, and i would also like a conversion calculator being showed on this website. Concersion tool such as Cels. to Kelvin. I have the calculation formula and i would like to script it in python and embed the conversion form in it. For example http://www.sciencegateway.org/tools/fwcal.htm .

So im asking... how could i do that? I do not want the guest to download the program from this webpage. What i need is the form to be showed online and then the calculations being made from guest computer. Not server. Im newbie to java thats why this is not good option to me.

After lots of searching i think ironpython may be somehow helpfull to me but... im asking you too.
 
C

Chris Angelico

Hi there, i would like to ask.. i need to create an html webpage and bring that live on the internet via my host service, and i would also like a conversion calculator being showed on this website. Concersion tool such as Cels. to Kelvin. I have the calculation formula and i would like to script it in python and embed the conversion form in it. For example http://www.sciencegateway.org/tools/fwcal.htm .

So im asking... how could i do that? I do not want the guest to download the program from this webpage. What i need is the form to be showed online and then the calculations being made from guest computer. Not server. Im newbie to java thats why this is not good option to me.

There have been a few attempts at making it possible to program a web
browser using Python. In fact, one is being discussed and developed
right now - search the list archives for Brython. But normally, the
way to script a user's browser is to use JavaScript. I'm not sure how
IronPython fits into your picture; it's an implementation of Python
that uses the .NET framework.

Unless you have a very good reason for wanting to use Python (eg you
want to share code with another Python project), I strongly recommend
learning JavaScript. What you're looking to do is fairly simple, and
not worth downloading to the user's browser a massive language engine
- because that's how systems like Brython work. Keep it simple, learn
a few languages, and you'll become a better programmer for it :)

ChrisA
 
L

llanitedave

I'll second this. Javascript is pretty comparable to Python in ease of learning, so that should be no obstacle. As for keeping the code from being accessible, you can put the javascript in a separate file that's called fromthe guest's web page, but that's far from a foolproof method. If you wantthe guest browser to do the calculation, there's no realistic way to keep the calculation code off of it.
 
L

llanitedave

I'll second this. Javascript is pretty comparable to Python in ease of learning, so that should be no obstacle. As for keeping the code from being accessible, you can put the javascript in a separate file that's called fromthe guest's web page, but that's far from a foolproof method. If you wantthe guest browser to do the calculation, there's no realistic way to keep the calculation code off of it.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top