installing python on a server?

J

John Salerno

Can anyone tell me how complicated it might be to install Python on my
server so I can use it for web apps? Is it a one-time process, or
something to maintain?

Thanks.
 
R

Rene Pijlman

John Salerno:
Can anyone tell me how complicated it might be to install Python on my
server so I can use it for web apps?

2 on a scale from 1 to 10.
Is it a one-time process, or something to maintain?

Both :)

I installed Python 2.2 - 2.4 from source on Linux with no problem
whatsoever. I now plan about 5 minutes installation time per new release,
that's 2 minutes to make coffee, 2 minutes to skim the release notes and
README and 1 minute to watch ./configure; make; make install do it's
magic.

There are some details to watch out for, such as having the required
libraries and include files around before installation, to enable specific
functionality (e.g. SSL support in socket). But that's no big deal.
 
J

John Salerno

Rene said:
John Salerno:

2 on a scale from 1 to 10.


Both :)

I installed Python 2.2 - 2.4 from source on Linux with no problem
whatsoever. I now plan about 5 minutes installation time per new release,
that's 2 minutes to make coffee, 2 minutes to skim the release notes and
README and 1 minute to watch ./configure; make; make install do it's
magic.

There are some details to watch out for, such as having the required
libraries and include files around before installation, to enable specific
functionality (e.g. SSL support in socket). But that's no big deal.

Hmm, sounds easy, yet I don't know where to start. What do I actually
use to install it onto the server? I've never dealt with server stuff
before, so I might not be familiar with the terminology.
 
P

Peter Hansen

John said:
Can anyone tell me how complicated it might be to install Python on my
server so I can use it for web apps? Is it a one-time process, or
something to maintain?

I'm not sure what you would expect to maintain. Do you expect some kind
of "bit-rot" to occur, requiring you to periodically rewrite files
in-place to refresh them (ala "core memory" of ages past)? ;-)

Generally speaking one needs to maintain software only to upgrade or
reconfigure it (e.g. adding a new package that you'd like to start using
in your web apps).

-Peter
 
R

Renato

You mentioned using python for web apps: with which framework?
(TurboGears, CherryPy, Subway, Django, whatever) Or only for cgi?

With which web server? (Apache, Twisted, Zope, etc.)

On which linux platform? (Slackware, Debian, Fedora/RedHat, Suse, etc)

I think you'll have to think about other questions before.

On systems with package management (pretty much all of them, except
Slack) install is a matter of a few commands. And you can automate it,
obviously.
 
J

John Salerno

Renato said:
You mentioned using python for web apps: with which framework?
(TurboGears, CherryPy, Subway, Django, whatever) Or only for cgi?

With which web server? (Apache, Twisted, Zope, etc.)

On which linux platform? (Slackware, Debian, Fedora/RedHat, Suse, etc)

I think you'll have to think about other questions before.

On systems with package management (pretty much all of them, except
Slack) install is a matter of a few commands. And you can automate it,
obviously.

Yikes, that's all the stuff I don't know. Maybe this is over my head
right now.
 
T

Terry Hancock

Can anyone tell me how complicated it might be to install
Python on my server so I can use it for web apps? Is it a
one-time process, or something to maintain?

Installing Python on a server is really, really easy. At
least it is if you have root privileges and a reasonably
well-known platform to install on.

*USING* the Python installation for web applications is a
bit more complicated -- you have many choices about how to
do that.

For my money, the easy way if you are mostly wanting to make
web applications is to use Zope. It has a big up-front
learning curve, but once you get to know it, maintaining
scripts becomes trivially easy to do.

If you have other constraints on your server, or you really
just want a static site with a few dynamic elements, you
might be better served with a lighter-weight package than
Zope, and there's maybe a dozen different ones to choose
from. Easier to learn, but probably more work in the long
run if you have to do a lot of script work on your site.
 
D

Dennis Lee Bieber

Yikes, that's all the stuff I don't know. Maybe this is over my head
right now.

Let's start with something simple then... Do you have admin (root)
privileges on this server machine -- or is it a machine belonging to
some ISP and you are hoping to add Python/CGI capability?
--
 
J

John Salerno

Dennis said:
Let's start with something simple then... Do you have admin (root)
privileges on this server machine -- or is it a machine belonging to
some ISP and you are hoping to add Python/CGI capability?

I guess it might be the latter. What I want is to add Python capability
to the server where my website is running, so that I can write Python
web apps and incorporate them into my HTML files.
 
D

Dennis Lee Bieber

I guess it might be the latter. What I want is to add Python capability
to the server where my website is running, so that I can write Python
web apps and incorporate them into my HTML files.

Unfortunately then, you have to ask the owners of the server
hardware if /they/ will give you that capability. (If you own the server
then we are back to the first side -- you need admin/root access to
install/configure the webserver to allow Python)

Many ISP's basic (home user, say) accounts are lucky to allow
anything more complex than a hit-counter. Netcom
(->Mindspring->Earthlink) used to have a scheme by which one could
create data entry forms; the submit button had to be set to a
pre-defined (ISP supplied action) which did nothing more than package
all the CGI field information into an email, and send the email to a
user-defined email address. There was no instantaneous feedback possible
(unless one had the ability to read the email with a program, perform
the updates locally, and upload a response to the website in time for a
timed refresh to find the page).

The next step up tends to be sites built using things like
Zope/CMF/Plone -- but even those servers require pure Python logic to be
"installed" as a "product"; and only certain accounts have that
privilege -- others are restricted to things like Zope's DTML, TAL, etc.
templating languages to manipulate data.

Above that would be something like Apache with Python defined as a
valid scripting language AND with security set to allow users to
upload/install scripts.
--
 
J

John Salerno

Dennis said:
Unfortunately then, you have to ask the owners of the server
hardware if /they/ will give you that capability. (If you own the server
then we are back to the first side -- you need admin/root access to
install/configure the webserver to allow Python)

Many ISP's basic (home user, say) accounts are lucky to allow
anything more complex than a hit-counter. Netcom
(->Mindspring->Earthlink) used to have a scheme by which one could
create data entry forms; the submit button had to be set to a
pre-defined (ISP supplied action) which did nothing more than package
all the CGI field information into an email, and send the email to a
user-defined email address. There was no instantaneous feedback possible
(unless one had the ability to read the email with a program, perform
the updates locally, and upload a response to the website in time for a
timed refresh to find the page).

The next step up tends to be sites built using things like
Zope/CMF/Plone -- but even those servers require pure Python logic to be
"installed" as a "product"; and only certain accounts have that
privilege -- others are restricted to things like Zope's DTML, TAL, etc.
templating languages to manipulate data.

Above that would be something like Apache with Python defined as a
valid scripting language AND with security set to allow users to
upload/install scripts.

Thanks. I'll have to check with my domain host, but I guess it might not
be possible.
 
S

stewart.midwinter

I'm wondering whether you couldnn't use MovPy for this purpose - a
situation where you don't have root access. You can install the whole
MovPy package in your home directory; it provides a self-contained
environment. At the moment I think it only runs on Windows boxen, but
that may change.
 
S

stewart.midwinter

I'm wondering whether you couldnn't use MovPy for this purpose - a
situation where you don't have root access. You can install the whole
MovPy package in your home directory; it provides a self-contained
environment. At the moment I think it only runs on Windows boxen, but
that may change.
 
M

Magnus Lycka

I'm wondering whether you couldnn't use MovPy for this purpose - a
situation where you don't have root access.

Huh? I thought the point with MovPy was *not* to install it!

A normal Python installation can certainly be performed in
the users home directory.

*If* John can log into the machine (ssh/telnet) and use
a C compiler (typical on a Linux box) he can build it from
source.

There are other problems though. Is he allowed to use
cgi-scripts or have his own processes running?

But in the end it's all simple.

John: Make sure to buy from an ISP that supports Python.
There are plenty of ISPs, so this can hardly be a major
obstacle.

See http://wiki.python.org/moin/PythonHosting for options.

The difficult thing is to decide how to build the web
page, considering all the web tool kits available...


I disagree on using Zope. It's probably not the easiest
to get an ISP to run, and the learning curve would not
be worth it for the intended purpose as I understood it.
Besides, Zope is currently in the transition from the
old version 2 to the much changed version 3, and one of
the big advantages of Zope, the big bunch of 3rd party
packages that you can simply plug in, it entirely a
Zope 2 phenomena. They don't exist for Zope 3 yet, so
you have to go for something old that will be deprecated
soon, or with the new and spiffy but ... empty.

For John, it seems Karrigell, http://karrigell.sourceforge.net/
could be a good fit.
 
J

John Salerno

Magnus said:
For John, it seems Karrigell, http://karrigell.sourceforge.net/
could be a good fit.

Yes, that does seem to be something like what I'm looking for.
Basically, I'd like to use Python inside my HTML, just as you would PHP
and the like. But I'd prefer not to use any kind of system that requires
anything specific only to it, and that you wouldn't normally find in
Python (i.e., anything that might make my scripts not portable to other
servers at a future time). I couldn't tell if this had such features or not.
 
J

John Salerno

John said:
Can anyone tell me how complicated it might be to install Python on my
server so I can use it for web apps? Is it a one-time process, or
something to maintain?

Thanks.

As it turns out, my hosting company supports Python on their servers! I
know I didn't see it there before, so either it was hidden or they
somehow turned it on for me after I asked about it. Either way, this
saves me a ton of trouble. :)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,285
Messages
2,571,415
Members
48,107
Latest member
jigyasauniversity

Latest Threads

Top