HTML - WEB FORM running PYTHON SCRIPT

Discussion in 'Python' started by Dimitrios Xenakis, Dec 21, 2012.

  1. 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.
     
    Dimitrios Xenakis, Dec 21, 2012
    #1
    1. Advertising

  2. On Sat, Dec 22, 2012 at 2:00 AM, Dimitrios Xenakis
    <> 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
     
    Chris Angelico, Dec 21, 2012
    #2
    1. Advertising

  3. Dimitrios Xenakis

    llanitedave Guest

    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.
     
    llanitedave, Dec 24, 2012
    #3
  4. Dimitrios Xenakis

    llanitedave Guest

    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.
     
    llanitedave, Dec 24, 2012
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Benjamin Rutt
    Replies:
    2
    Views:
    976
    Peter Hansen
    Dec 20, 2005
  2. Ellie
    Replies:
    2
    Views:
    480
    Ellie
    Oct 30, 2008
  3. Replies:
    2
    Views:
    162
    Sean O'Halpin
    Dec 17, 2008
  4. Replies:
    4
    Views:
    203
    Josef Moellers
    Oct 27, 2007
  5. Replies:
    4
    Views:
    308
    ccc31807
    Jul 29, 2011
Loading...

Share This Page