Web devel with python. Whats the best route?

Chris Watson chris at voodooland.net
Mon Jan 8 22:15:42 EST 2001


On Tue, 9 Jan 2001, Gerhard [iso-8859-1] Häring wrote:

> The original post most probably meant mod_python. Another Python-Apache
> module is mod_snake, just to add to the confusion :-) URLs are
> www.modpython.org, modsnake.sourceforge.net.

I *think* in my original post it was mod_python :) but during the course
of the thread it got twisted. Like in gradeschool when the teacher has you
form a line and whispers something to the kid in the back and then he/she 
tells the person in front and so on.. till it hits the person at the other
end is completely twisted and warped from the original statement :)

> But I agree that the old-fash CGI approach is the safest bet. But a
> larger web-application is much easier to program when it is a
> long-running process and not a CGI script. You also don't have to open
> database connections each time, load and parse config files each time.
> It *can* make a noticable speed difference when there is zero startup
> time in a script.

Well all my script is doing is the following:

#!/usr/local/bin/python

import os

host = raw_input("Enter a hostname: ");
os.spawnv(os.P_WAIT, '/usr/bin/scp', ('-v',
'user@%s:/home/user/TESTFILE' % host, '/tmp/TESTFILE'))
os.system("pico /tmp/TESTFILE")
os.spawnv(os.P_WAIT, '/usr/local/bin/rsync', ('rsync', '-v', '-p', '-e',
'ssh', '/tmp/TESTFILE', 'user@%s:/home/user/TESTFILE' % host))

I am keeping each task from my admin system as a simple single task python
script such as the above. I just wanted to html'ify them now and take
input from the user using a form instead of console input. This might show
you better all I want to do. I have been at python with ZERO previous
devel exp for 3 days now :)  So doing alot of things on the web are still
beyond my abilities right now. I may even be biting off more than I can
chew trying to webify things. I may need to just stick to doing the app in
console mode for now till I get a better grasp of things. But im not sure.

I appreciate everyones comments, ideas and suggestions. This list has
excellent people to ask questions and bounce ideas off of even for people
new to python and/or programming.

--
=============================================================================
-Chris Watson         (316) 326-3862 | FreeBSD Consultant, FreeBSD Geek 
Work:              scanner at jurai.net | Open Systems Inc., Wellington, Kansas
Home:  scanner at deceptively.shady.org | http://open-systems.net
=============================================================================
WINDOWS: "Where do you want to go today?"
LINUX: "Where do you want to go tomorrow?"
BSD: "Are you guys coming or what?"
=============================================================================
irc.openprojects.net #FreeBSD -Join the revolution!
ICQ: 20016186





More information about the Python-list mailing list