SunQuest
           Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old March 11th, 2003, 10:08 AM
ruach ruach is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 8 ruach User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
XML! why python?

Ok all you python lovers out their. I have posted a similar question in the XML forum but am not getting the answers I am looking for. I am going to be building two different XML web applications. One is a database of machines and port configurations on a large network. The other is a system for writing technical papers with docbooks. I can not decide wether to use perl or python.

What advatages does python have over perl especialy performance wise?

Why would you recommend that I use python?

Thanks a lot.
_______________________
Ruach
SLC, UT

Reply With Quote
  #2  
Old March 11th, 2003, 10:42 AM
Strike Strike is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 383 Strike User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 7
Send a message via ICQ to Strike Send a message via AIM to Strike Send a message via Yahoo to Strike
I think Python compares pretty favorably with Perl in XML processing speed (not that it's better, but comparable). But what's important is that the toolkits for XML are standard Python libraries and are very well-done. Not to mention there are tons of different paths you can choose for your XML processing. There's SAX, there's DOM, there's SGMLParser, etc. The key is that the code maintenance will be easier because pretty much all other things are equal. Also, it will scale much better into larger apps. That's my take anyway.
__________________
Debian - because life's too short for worrying.
Best. (Python.) IRC bot. ever.

Reply With Quote
  #3  
Old March 11th, 2003, 11:37 AM
ruach ruach is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 8 ruach User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
It seems thought that there is a lot more support for perl then ptyhon? is that not true in the case of XML. Also why would it scale better into larger apps and what makes the code maintenance easier?

Reply With Quote
  #4  
Old March 11th, 2003, 02:24 PM
Strike Strike is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 383 Strike User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 7
Send a message via ICQ to Strike Send a message via AIM to Strike Send a message via Yahoo to Strike
Quote:
Originally posted by ruach
It seems thought that there is a lot more support for perl then ptyhon? is that not true in the case of XML. Also why would it scale better into larger apps and what makes the code maintenance easier?

Well, depends on what you mean by support I guess. Both have very active coding communities which are more than willing to support you. The best way of getting python help is through the comp.lang.python newsgroup.

The Python language itself scales better than Perl does (in my opinion/experience and from my observation). It's more modular, encourages OO more (which allows for component-izing things rather easily), and it seems that the use of "best practices" in Python is more encouraged by the language than in Perl. Perl is infamous for being "write only" and can be very hard to read. But, I'm not going to start a flame war, you can read plenty of python vs perl arguments anywhere Both will work, I just wanted to say that Python is a great language

Reply With Quote
  #5  
Old March 12th, 2003, 09:08 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
I'm a perler so I'll respond to Strike's criticism of Perl (since noone else is).

The "write-only" jab is a fair enough one. It's very easy to write convoluted, utterly meaningless (to a human reader) code that runs perfectly well in Perl. However, it's not an inherent flaw in the language, because you can also write clean, easy to maintain code if you take a little time to do it. The came thing goes for C, PHP, etc. You can turn it into a mangled mess, or take a little time to do it right.

The best practice concern runs in a similar vein. You can use strict in Perl and write clean, quality code, or you can bang out a script that's a total mess and balancing on a hair. It's the discipline of the programmer that determines the outcome, it's the great flexibiilty of the language (being abused in this case) that allows it.

As for the scalability, I have no numbers either, but in my experience, Perl is very scalable, and some major additions in 5.8 only bolster that claim.

One thing I have to admit that Python probably has over Perl is development time. Creating a readable, quality script in Perl probably takes a little longer than the same script in Python.

My $0.02

Reply With Quote
  #6  
Old March 14th, 2003, 06:05 AM
telex4's Avatar
telex4 telex4 is offline
Wacky hack
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2001
Location: London, England
Posts: 512 telex4 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 25 m 29 sec
Reputation Power: 8
I'd back Ctb up on his points, but I'd still say use Python

I've been doing a lot more Python coding than Perl recently, and I just find it much easier to keep nice code. Yes, I can make my code just as nice in Perl as I can in Python, but by enforcing certain standards on me, and using a much better object-orientated approach, Python is just a dream to write in.

The only reason I use Perl now is for CGI scripts, system admin scripts and anything that requires regular expressions, because Perl is just much nicer to use in those situations IMO.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > XML! why python?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway