Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #35295 > unrolled thread

HTML - WEB FORM running PYTHON SCRIPT

Started byDimitrios Xenakis <gouzounakis@hotmail.com>
First post2012-12-21 07:00 -0800
Last post2012-12-23 20:12 -0800
Articles 4 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  HTML - WEB FORM running PYTHON SCRIPT Dimitrios Xenakis <gouzounakis@hotmail.com> - 2012-12-21 07:00 -0800
    Re: HTML - WEB FORM running PYTHON SCRIPT Chris Angelico <rosuav@gmail.com> - 2012-12-22 02:27 +1100
      Re: HTML - WEB FORM running PYTHON SCRIPT llanitedave <llanitedave@veawb.coop> - 2012-12-23 20:12 -0800
      Re: HTML - WEB FORM running PYTHON SCRIPT llanitedave <llanitedave@veawb.coop> - 2012-12-23 20:12 -0800

#35295 — HTML - WEB FORM running PYTHON SCRIPT

FromDimitrios Xenakis <gouzounakis@hotmail.com>
Date2012-12-21 07:00 -0800
SubjectHTML - WEB FORM running PYTHON SCRIPT
Message-ID<febfd2a6-c30f-47bf-8b66-8b5544475f46@googlegroups.com>
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.

[toc] | [next] | [standalone]


#35296

FromChris Angelico <rosuav@gmail.com>
Date2012-12-22 02:27 +1100
Message-ID<mailman.1152.1356103682.29569.python-list@python.org>
In reply to#35295
On Sat, Dec 22, 2012 at 2:00 AM, Dimitrios Xenakis
<gouzounakis@hotmail.com> wrote:
> 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

[toc] | [prev] | [next] | [standalone]


#35437

Fromllanitedave <llanitedave@veawb.coop>
Date2012-12-23 20:12 -0800
Message-ID<27ef573a-1259-48c5-b525-f42774444bcc@googlegroups.com>
In reply to#35296
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 from the guest's web page, but that's far from a foolproof method.  If you want the guest browser to do the calculation, there's no realistic way to keep the calculation code off of it.

[toc] | [prev] | [next] | [standalone]


#35442

Fromllanitedave <llanitedave@veawb.coop>
Date2012-12-23 20:12 -0800
Message-ID<mailman.1241.1356328425.29569.python-list@python.org>
In reply to#35296
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 from the guest's web page, but that's far from a foolproof method.  If you want the guest browser to do the calculation, there's no realistic way to keep the calculation code off of it.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web