473,797 Members | 2,970 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python v PHP: fair comparison?

I don't know if this is a fair comparison or not. Any comments
appreciated.

- Python is more readable, and more general purpose
- PHP has awful backward compatibility
- PHP has a lower barrier to entry
- Most inexpensive web-hosters support PHP, but not Python
- PHP has far more pre-writen scripts available
- Newer versions of mod_python require Apache 2.0, which few hosters
have
- There is more demand for PHP developers, than Python developers

Nov 14 '06
50 2664
walterbyrd a écrit :
Michael Torrie wrote:

>>Absolutely false. Most of my standalone, command-line scripts for
manipulatin g my unix users in LDAP are written in PHP, although we're
rewriting them in python.


I would say that you are one of very few who use PHP for sys-admin
tasks - and even you have switched to Python. In general, it does not
seem to me that PHP has caught on as a sys-admin language.

However, as sys-admin scripting langanges go, I would also say that
Python is far less popular than butt-ugly Perl. Again - just based on
what I've seen.
Perl is a scripting language. By 'design'. It's meant to be a better
sh+sed+awk. Python is a general purpose programming language meant to
fill the gap between shell scripts and C programs. So Perl is obviously
a better scripting language than Python. The problem is that Q&D
sys-admin scripts tend to become full-blown apps - and then, Perl starts
to suck.
Nov 15 '06 #21
walterbyrd a écrit :
Luis M. González wrote:
>>the new crop of web frameworks (Django, Turbo Gears, etc...).

>>>- Newer versions of mod_python require Apache 2.0, which few hosters
have

You can also get alder versions of mod_python. What's the problem?


The problem is that the system requirements for django and turbogears
are sky-high. I think Django requires Apache 2.0 (and maybe mod_python
3.x), and CherryPy (part of turbogears) requires Python 2.4.
Yes. Neither Apache 2.0 nor mod_python 3.x nor Python 2.4 are really
bleeding edge, you know.
If you are
developing for a hosted environment, this can be a big problem. Few
enough hosters provide python to begin with, then add to that such
requirements as apache 2.0 - and you left with almost nothing.
You mean there are web hosting companies that are still using Apache
1.3.x ?

C'mon, let's be serious. I just ordered a dedibox - a small dedicated
web server - for my personal use. It's only 30 euros a month, you know...
Nov 16 '06 #22
walterbyrd wrote:
Trying to be as fair as I can be, my research shows that demand for
developers where PHP is the primary is *far* higher than jobs where
Python is the primary skills.
Probably because PHP is so bug-prone and man-inefficient that a small
website occupies a programmer's whole time, whereas a single Python (or
Ruby, or Perl, or even Java) programmer could manage several web sites.

(If by "probable" I mean "wishful thinking", that is :)
Carl Banks

Nov 16 '06 #23
At Wednesday 15/11/2006 21:28, Bruno Desthuilliers wrote:
>Michael Torrie a écrit :
On Tue, 2006-11-14 at 18:55 -0800, Luis M. González wrote:
>>- Python is more readable, and more general purpose

Yes, php is only for web.
Absolutely false.

From a purely technical POV, you're of course right. But PHP has been
hacked (nobody in it's own mind would pretend it has ever been
'designed') for web programming, and since the language by itself is
totally and definitively braindead, using it for anything else is either
masochism or lack of knowledge of better solutions. Heck, even Perl is
better for pure admin/scripting tasks.
Someone here (= at work) needed to write some PDF
reports, to be run from a bunch of ini-like
files. Without much research nor analysis nor
thinking nor approval, he said "let's use this
php library!". Surely the reports came in a few days. But:
- another dependency was added to the project
- the .ini format -which was suposed to be an
internal implementation detail- is now part of
the public interfase to the report generator
- a lot of PHP code duplicates the original class hierarchy (in delphi)
- php sucks :)

Of course there are a lot of unrelated issues
here, but I think that it's such a braindead
language which turns people into braindead programmers :)
--
Gabriel Genellina
Softlab SRL

_______________ _______________ _______________ _____
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
Nov 16 '06 #24
At Wednesday 15/11/2006 22:11, bruce wrote:
>interesting ongoing thread...

i've seen a number of these over the years.. my language is better than your
language!!

i'm sure this question on the php list would have findings/results that are
essentially opposite of what is being discussed here!
Sure. But after you realize that a language is just a tool to
complete a task, most of the discussions are meaningless. The
original post didn't say "python is better than php", and I think the
comparison is rather fair.
--
Gabriel Genellina
Softlab SRL

_______________ _______________ _______________ _____
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
Nov 16 '06 #25

Bruno Desthuilliers wrote:
walterbyrd a écrit :
You mean there are web hosting companies that are still using Apache
1.3.x ?
Practically all web-hosters still use Apache 1.3.x. Certainly all of
the lower priced hosters.
C'mon, let's be serious. I just ordered a dedibox - a small dedicated
web server - for my personal use. It's only 30 euros a month, you know...
What if I only need 25mb of space? I can that with a PHP hoster for $10
a year. That is about 1/36th the price that you posting about.

Maybe you don't mind paying 30 euros a month, but a lot others do.

Nov 16 '06 #26

Gabriel Genellina wrote:
- php sucks :)
I think that it's such a braindead
language which turns people into braindead programmers :)

In fairness, a lot of very serious work is done in PHP. I think yahoo
and other major web-sites use php.

I have issues with PHP as well. They will break backward compatibility
on a whim, and it is an ugly language - especially when mixed with
html. But, PHP does have it's streaths, and Python is not without it's
weaknesses.

Nov 16 '06 #27
In article <11************ **********@m73g 2000cwd.googleg roups.com>,
Luis M. González <lu*****@gmail. comwrote:
Nov 16 '06 #28
On 2006-11-15 20:59:26 -0500, "walterbyrd " <wa********@ina me.comsaid:
>
Bruno Desthuilliers wrote:
>walterbyrd a écrit :
>You mean there are web hosting companies that are still using Apache
1.3.x ?

Practically all web-hosters still use Apache 1.3.x. Certainly all of
the lower priced hosters.
Not true. Dreamhost, at least, uses Apache 2.
>
>C'mon, let's be serious. I just ordered a dedibox - a small dedicated
web server - for my personal use. It's only 30 euros a month, you know...

What if I only need 25mb of space? I can that with a PHP hoster for $10
a year. That is about 1/36th the price that you posting about.

Maybe you don't mind paying 30 euros a month, but a lot others do.
Of course, you can't get $10 a year plans on Dreamhost. But with deals
you can get it down to about that low, at least for the first year. I
suppose I'm lucky enough not to miss $8 a month otherwise.

Best,
James

Nov 16 '06 #29
bruce wrote:
ummm bruno...

you don't 'need' apache to run php.

in fact, although i'm from the old hard c/c++ world.... way before web apps,
i haven't really found much for most general apps (not ui/not threaded
stuff) that php can't do..
You simply haven't been looking hard enough.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Nov 16 '06 #30

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
34266
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
59
4317
by: Hugh Macdonald | last post by:
I've recently been trying out various different GUI frameworks in Python and was wondering if I could get your input on the pros and cons of the different ones... wxPython: I love the programming side of wxPython, but I find it's just so slow to initialise in the first place. Tkinter: While it's fast to load up, the syntax has never really appealed to me
114
9890
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
10
1892
by: walterbyrd | last post by:
I don't know if this is a fair comparison or not. Any comments appreciated. - Python is more readable, and more general purpose - PHP has awful backward compatibility - PHP has a lower barrier to entry - Most inexpensive web-hosters support PHP, but not Python - PHP has far more pre-writen scripts available - mod_python is difficult to set up, and use, and is buggy and prone to crash
0
1591
by: Paul Boddie | last post by:
QOTW: "I think you've got the wrong intuition about the balance between the amount of bandwidth and the amount of computation a given numer of dollars would buy. You've hundreds of CPU cycles available per bit transmitted; space enough to stick in even Python." - Thomas Womack (on comp.lang.lisp, earlier this year, so it's not a true QOTW) http://groups.google.com/group/comp.lang.lisp/msg/453239d7b8e0ef72 "I'm a recent, belated convert...
71
3363
by: Jack | last post by:
I understand that the standard Python distribution is considered the C-Python. Howerver, the current C-Python is really a combination of C and Python implementation. There are about 2000 Python files included in the Windows version of Python distribution. I'm not sure how much of the C-Python is implemented in C but I think the more modules implemented in C, the better performance and lower memory footprint it will get. I wonder if it's...
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9536
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10468
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10245
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9063
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5458
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4131
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.