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


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

Re: Running a Python script on a web server

Started byChris Angelico <rosuav@gmail.com>
First post2011-06-08 14:04 +1000
Last post2011-06-08 14:04 +1000
Articles 1 — 1 participant

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

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Running a Python script on a web server Chris Angelico <rosuav@gmail.com> - 2011-06-08 14:04 +1000

#7210 — Re: Running a Python script on a web server

FromChris Angelico <rosuav@gmail.com>
Date2011-06-08 14:04 +1000
SubjectRe: Running a Python script on a web server
Message-ID<mailman.15.1307505844.11593.python-list@python.org>
On Wed, Jun 8, 2011 at 1:10 PM, Abhijeet Mahagaonkar
<abhijeet.manohar@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

[toc] | [standalone]


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


csiph-web