FAQ
Dear Pythoners,

I have written a few python tools and cant distribute as exe due to
scalability issues. I started with a few tools and gave it as exe to the
users and now as the number of tools have increased, they complain they have
too many exes :)

So i have requested a server space so I need some inputs on how i will be
able to "host" these scripts on a webserver and have them run on browsers
rather than on individual systems.
I have not done web prog, so consider this as a noob question :)

Thanks in advance

Warm Regards,
Abhijeet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110608/e863fb98/attachment.html>

Search Discussions

  • Chris Angelico at Jun 8, 2011 at 4:04 am

    On Wed, Jun 8, 2011 at 1:10 PM, Abhijeet Mahagaonkar wrote:
    So i have requested a server space so I need some inputs on how i will be
    able to "host" these scripts on a webserver and have them run on browsers
    rather than on individual systems.
    Python doesn't normally run in a web browser. There's two easy options:

    1) Use very simple web hosting that lets people download scripts and
    run them. Anything can do this, but all you gain is that they don't
    have to keep a collection of scripts / EXEs on their hard drives.

    2) Run the Python scripts on the web server. I don't know whether this
    is even possible in your situation; it would turn them into quite
    different tools.

    I have no experience with it, but Jython can make applets. Again,
    though, these would be quite different tools from simple Python
    scripts. Web browsers aren't generally happy for in-browser scripts
    to, for instance, read and write files on the user's hard drive.

    I think you're ultimately going to need to keep on distributing those
    scripts. But if you get your users to install a Python interpreter,
    they need only install it once and then you can distribute all your
    scripts in .py format rather than py2exeing them all.

    Chris Angelico
  • Nitin Pawar at Jun 8, 2011 at 5:52 am
    There are few options available with mod_python + apache configuration but
    it comes with limitation as the scripts will be running on servers and you
    will need to parse the requests and inputs as a web request to the script


    On Wed, Jun 8, 2011 at 9:34 AM, Chris Angelico wrote:

    On Wed, Jun 8, 2011 at 1:10 PM, Abhijeet Mahagaonkar
    wrote:
    So i have requested a server space so I need some inputs on how i will be
    able to "host" these scripts on a webserver and have them run on browsers
    rather than on individual systems.
    Python doesn't normally run in a web browser. There's two easy options:

    1) Use very simple web hosting that lets people download scripts and
    run them. Anything can do this, but all you gain is that they don't
    have to keep a collection of scripts / EXEs on their hard drives.

    2) Run the Python scripts on the web server. I don't know whether this
    is even possible in your situation; it would turn them into quite
    different tools.

    I have no experience with it, but Jython can make applets. Again,
    though, these would be quite different tools from simple Python
    scripts. Web browsers aren't generally happy for in-browser scripts
    to, for instance, read and write files on the user's hard drive.

    I think you're ultimately going to need to keep on distributing those
    scripts. But if you get your users to install a Python interpreter,
    they need only install it once and then you can distribute all your
    scripts in .py format rather than py2exeing them all.

    Chris Angelico
    --
    http://mail.python.org/mailman/listinfo/python-list


    --
    Nitin Pawar
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20110608/51eb253a/attachment.html>
  • Abhijeet Mahagaonkar at Jun 8, 2011 at 5:52 am
    Python doesn't normally run in a web browser. There's two easy options:
    Is there an option of running it like php? I have never written in php, but
    my understanding is that the php script will be saved in some remote server
    and we will be able to run it using the url.
    pls correct me if i;m wrong.

    So i thought is there a python way of doing something like this?
    On Wed, Jun 8, 2011 at 9:34 AM, Chris Angelico wrote:

    On Wed, Jun 8, 2011 at 1:10 PM, Abhijeet Mahagaonkar
    wrote:
    So i have requested a server space so I need some inputs on how i will be
    able to "host" these scripts on a webserver and have them run on browsers
    rather than on individual systems.
    Python doesn't normally run in a web browser. There's two easy options:

    1) Use very simple web hosting that lets people download scripts and
    run them. Anything can do this, but all you gain is that they don't
    have to keep a collection of scripts / EXEs on their hard drives.

    2) Run the Python scripts on the web server. I don't know whether this
    is even possible in your situation; it would turn them into quite
    different tools.

    I have no experience with it, but Jython can make applets. Again,
    though, these would be quite different tools from simple Python
    scripts. Web browsers aren't generally happy for in-browser scripts
    to, for instance, read and write files on the user's hard drive.

    I think you're ultimately going to need to keep on distributing those
    scripts. But if you get your users to install a Python interpreter,
    they need only install it once and then you can distribute all your
    scripts in .py format rather than py2exeing them all.

    Chris Angelico
    --
    http://mail.python.org/mailman/listinfo/python-list
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20110608/65b09c7b/attachment.html>
  • Chris Angelico at Jun 8, 2011 at 6:30 am

    On Wed, Jun 8, 2011 at 3:52 PM, Abhijeet Mahagaonkar wrote:
    Python doesn't normally run in a web browser. There's two easy options:
    Is there an option of running it like php? I have never written in php, but
    my understanding is that the php script will be saved in some remote server
    and we will be able to run it using the url.
    pls correct me if i;m wrong.
    So i thought is there a python way of doing something like this?
    Yes, you can do that. That's what Nitin Pawar suggested. That's all
    part of what I lumped together as option #2 - run the scripts on the
    server. It's completely different from distributing them to people as
    EXEs, but it might very well do what you need.

    Chris Angelico
  • D'Arcy J.M. Cain at Jun 8, 2011 at 6:31 am

    On Wed, 8 Jun 2011 11:22:53 +0530 Abhijeet Mahagaonkar wrote:
    Python doesn't normally run in a web browser. There's two easy options:
    Is there an option of running it like php? I have never written in php, but
    my understanding is that the php script will be saved in some remote server
    and we will be able to run it using the url.
    pls correct me if i;m wrong.
    Well, not wrong but perhaps not phrasing your original question
    correctly.
    On Wed, Jun 8, 2011 at 1:10 PM, Abhijeet Mahagaonkar
    wrote:
    So i have requested a server space so I need some inputs on how i will be
    able to "host" these scripts on a webserver and have them run on browsers
    rather than on individual systems.
    That's the normal way to run Python on the web. You store your Python
    (or Perl or PHP or compiled C) programs on a web server that offers
    Python <PLUG TYPE="blatant">http://www.Vex.Net/</PLUG> and when someone
    clicks on the link the server runs them and presents the results. This
    is different than something like Java or Javascript that runs in the
    browser.

    If that still doesn't answer your question then perhaps you can try to
    clarify exactly what it is you are trying to do.

    --
    D'Arcy J.M. Cain <darcy at druid.net> | Democracy is three wolves
    http://www.druid.net/darcy/ | and a sheep voting on
    +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
  • Abhijeet Mahagaonkar at Jun 8, 2011 at 6:43 am
    I guess i got my answer :) Thanks

    Regards,
    Abhijeet
    On Wed, Jun 8, 2011 at 12:01 PM, D'Arcy J.M. Cain wrote:

    On Wed, 8 Jun 2011 11:22:53 +0530
    Abhijeet Mahagaonkar wrote:
    Python doesn't normally run in a web browser. There's two easy options:
    Is there an option of running it like php? I have never written in php, but
    my understanding is that the php script will be saved in some remote server
    and we will be able to run it using the url.
    pls correct me if i;m wrong.
    Well, not wrong but perhaps not phrasing your original question
    correctly.
    On Wed, Jun 8, 2011 at 1:10 PM, Abhijeet Mahagaonkar
    wrote:
    So i have requested a server space so I need some inputs on how i
    will be
    able to "host" these scripts on a webserver and have them run on
    browsers
    rather than on individual systems.
    That's the normal way to run Python on the web. You store your Python
    (or Perl or PHP or compiled C) programs on a web server that offers
    Python <PLUG TYPE="blatant">http://www.Vex.Net/</PLUG> and when someone
    clicks on the link the server runs them and presents the results. This
    is different than something like Java or Javascript that runs in the
    browser.

    If that still doesn't answer your question then perhaps you can try to
    clarify exactly what it is you are trying to do.

    --
    D'Arcy J.M. Cain <darcy at druid.net> | Democracy is three wolves
    http://www.druid.net/darcy/ | and a sheep voting on
    +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: <http://mail.python.org/pipermail/python-list/attachments/20110608/512e4118/attachment.html>

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJun 8, '11 at 3:10a
activeJun 8, '11 at 6:43a
posts7
users4
websitepython.org

People

Translate

site design / logo © 2022 Grokbase