Click to See Complete Forum and Search --> : Learning Python, need info.
Bomber_007
11-06-2000, 08:41 PM
Hi,
I have a little bit of programming experience (programmed a couple of nifty things on my TI-83 calculator http://www.linuxnewbie.org/ubb/biggrin.gif and I've fiddled a bit with C, but had trouble grasping it), so I've decided to try my hand at Python.
Basically I want to know the sort of thing Python is good at and the sort of things is sucks at.
For my first project I was thinking of doing some CGI scripting (using Python) to say for example output a realtime directory listing into a webpage. Then enable the user to get more info about each file in the directory.
Is this a hard task with Python?
I have huge experience with Telnet Talkers (I run one of my own) so I was thinking that further down the track (a lot further) I write a talker server code in Python (all the current ones are written in C), is something like this possible? I briefly looked a thing called Medusa and it would seem that I could use that for the socket architecture and build the talker code around it.
What do people think about this?
Some input and info would be greatly appriciated!
Thanks.
[This message has been edited by Bomber_007 (edited 06 November 2000).]
klamath
11-06-2000, 10:16 PM
CGI is easy with Python. I've found it doesn't scale that well (for more advanced web dev stuff, you may need to use PHP, mod_perl, or Java Servlets). But for your needs, it should be fine.
------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
Looking for an open source project to contribute to? Check out the BBB (http://bbb.sourceforge.net)
jemfinch
11-07-2000, 12:10 AM
Originally posted by klamath:
CGI is easy with Python. I've found it doesn't scale that well (for more advanced web dev stuff, you may need to use PHP, mod_perl, or Java Servlets). But for your needs, it should be fine.
You obviously don't know of mod_python, which does the exact same thing for python that mod_perl does for perl.
You also should understand that Zope is programmed almost entirely in python. So python can most definitely scale on web servers.
Python is good at everything; It's not really specialized toward any particular field at the expense of any other fields (whereas some might argue that perl's exceptional ability at text processing leads to a lack of focus on the maintainability of other fields that perl might work with)
One thing python is especially good at is teaching good programming style and concepts http://www.linuxnewbie.org/ubb/smile.gif
Jeremy
klamath
11-07-2000, 01:45 AM
Actually, I have heard of mod_python - I looked into that a while ago before I even tried Perl and mod_perl. However, at the time, mod_python was unmaintained, and seemed to be a relative dead-end. The website was out of date, and the FTP server was really slow and located in Argentina. Perhaps the situation has changed -- but IMHO, mod_python is the kind of product that needs a lot of maintainence. Embedding an interpreter, and providing a complete API to httpd is NOT a trivial piece of software. mod_perl is supported by several companies, and has a very active community of developers and users. I wish I could say the same for mod_python (web programming in Python would be *nice*). Perhaps my info is out of date.
Zope is actually a web server in its own right. Also, it uses a fair amount of C for speed. I admit I haven't really looked into Zope -- but I was talking about using Python as a web programming language. Whether you can write a web application server in Python (i.e. Zope) is really a different matter.
Don't get me wrong - I like Python and I know it, and I would like to use it more often. I just don't think it's ready for serious web programming yet. But that's just my opinion - I may be wrong http://www.linuxnewbie.org/ubb/biggrin.gif
------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
Looking for an open source project to contribute to? Check out the BBB (http://bbb.sourceforge.net)
jemfinch
11-07-2000, 02:33 AM
Originally posted by klamath:
Don't get me wrong - I like Python and I know it, and I would like to use it more often. I just don't think it's ready for serious web programming yet.
What features do you think it's lacking that make it inadequate for "serious web programming"?
Jeremy
klamath
11-07-2000, 09:23 AM
None - but as I said, if mod_python is as bad as it was when I last tried it, Python is lacking that (i.e. decent performance).
Also, there are *tons* of web-related modules for Perl. What web templating systems are there for Python (there are 5 or 10 different ones for Perl). Things like all the Apache modules (Apache::Filter, Apache: http://www.linuxnewbie.org/ubb/biggrin.gifBI, etc).
------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)
Looking for an open source project to contribute to? Check out the BBB (http://bbb.sourceforge.net)
TaeShadow
11-07-2000, 11:57 AM
Hey, Google uses Python. It can't be all that bad.
Tae
commdogg
12-27-2000, 09:24 PM
Originally posted by TaeShadow:
Hey, Google uses Python. It can't be all that bad.
Tae
So does Yahoo, at least for the maps.yahoo.com
jemfinch
12-28-2000, 03:22 AM
Heck, Zope (http://www.zope.org) is written in python (webserver and all.)
Zope runs technocrat.net, appwatch.com, and many other sites. It's a quality design, and performance obviously isn't lacking.
Also note that there exists Mod Snake (http://modsnake.sourceforge.net/) that seems more actively developed than mod_python.
Jeremy