Running a Python script on a web server

Abhijeet Mahagaonkar abhijeet.manohar at gmail.com
Wed Jun 8 01:52:53 EDT 2011


>>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 <rosuav at gmail.com> wrote:

> On Wed, Jun 8, 2011 at 1:10 PM, Abhijeet Mahagaonkar
> <abhijeet.manohar at gmail.com> 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-0001.html>


More information about the Python-list mailing list