trashthing
07-21-2003, 11:59 PM
hi. i have seen alot of people starting to use Python. i looked at it but, didn't do much with it, that is because i use Perl. with all these people using Python, should i study Python instead of Perl?
|
Click to See Complete Forum and Search --> : so many people are using Python trashthing 07-21-2003, 11:59 PM hi. i have seen alot of people starting to use Python. i looked at it but, didn't do much with it, that is because i use Perl. with all these people using Python, should i study Python instead of Perl? roamingnomad 07-22-2003, 12:25 AM I'm learning Python mainly because it's supposed to be easy to learn; however, there are a few other reasons. It's supposed to be a good foundation for C, and, according to Eric Raymond, large programs can be coded quickly. You can use Python as an extension to C programs. Eric Raymond has also written a, review (is that the word?) of Python here (http://www.linuxjournal.com/article.php?sid=3882). fetchmailconf was written in Python. Python is on just about every Linux system (is Perl? I don't know). As you can see, most of my Python research was done at ESR's website, however, I was skeptical until I found a paragraph about Python in 'Red Hat Linux 8: Unleashed.' btw, how do you put bash shell scripting into Python programs??? serz 07-22-2003, 12:28 AM From what I've heard Phyton is not powerfull, it's ultra-powerfull. Alex Cavnar, aka alc6379 07-22-2003, 12:29 AM I'm going to move this one into Programming, as it's more topical there, but not without saying a few words: First of all, I'm a junior Python zealot. I LOVE Python. But... Don't stop using Perl just because Python's popular. Python's SUPER easy to use, but Perl's more well known. In fact, at the moment, you could actually get preferential treatment for a job in some shops if you know Perl. IMHO, Python's steadily gaining ground, but Perl's not going anywhere soon. You can probably do just about the same things in either Perl or Python and have just as satisfying results. MMA 07-22-2003, 11:26 AM I'm a beginner Perl programmer. I've used many programming languages such as C/C++ and Java. Just bit, looking through codes etc etc. One thing i hate about Python is that the structuring. It doesn't use the { and } for grouping the classes and subs. becuase i find it REALLY hard to read the codes. Its very hard. I find it different from any other languages. However i've also noticed a LOT of people using Python nowadays. Like portage in gentoo. Gonna try to learn Python soon. At least enough to be able to read what the code does and is meant todo. Oubipaws 07-22-2003, 01:38 PM PYTHON is nice to know, it comes in handy for some things, mainly bigger projects that you don't really want to do in PERL. PERL and PYTHON are just about equal to each other in power, just one is more cleaner than the other... personally I prefer perl because of its ease of use mrBen 07-22-2003, 04:09 PM Personally, I think Python is fantastic - it's both easy to learn and powerful. Plus you have the added advantage of being able to understand the code you wrote last month, whereas not all Perl programs are like that. Can't recommend it highly enough. MMA 07-22-2003, 05:05 PM Ok, i'm learning Python right now :-) jlmb 07-22-2003, 05:24 PM After reading How to be Become a Hacker by eric and the linux journal article posted above i decided to try Python over Perl. But as some posted, keep using Perl. Every language has its pros and cons. sarah31 07-22-2003, 06:23 PM speaking from a packagers standpoint....python is nicer to deal with. perl may be easy to learn but it is a really lazy language. most coders seem to write once and read never and leave it up to others to manually fix their syntax. added to this their makefiles (when present) suck something fierce because you have to go into them find the problem areas and then patch them. standard c/c++ makefiles are so much easier to deal with. as for python apps ...very easy to package and generally are a little cleaner. bwkaz 07-22-2003, 09:59 PM Originally posted by roamingnomad Python is on just about every Linux system (is Perl? I don't know). Perl doesn't have to be on every Linux system (although even the basic LFS book does install it at one point, just because Perl scripts are used to compile something else). But then, neither does Python -- and the LFS book definitely doesn't tell you how to install Python. So if you're going by that, Perl is more widespread (but, well, don't go by that ;)). What I don't know about, is support on other Unix OS's. I know Perl is usable just about everywhere (Solaris, AIX, BSD, and whatnot else), but I don't know if Python is or not. You're probably guaranteed to find Perl on other Unix flavors, in other words. I don't know about Python -- but I'd guess that it wouldn't be too extremely difficult to port it. And don't think I'm trying to get you to use one or the other, either. I like Python very much, personally, after using it to write a slideshow (http://www.alobbs.com/modules.php?op=modload&name=slideshow&file=index). But I do think Perl has its uses. So call me a fence-sitter, see if I care! :p iDxMan 07-22-2003, 11:33 PM On the whole, you'll probably find perl more often, but python is just a compile away.. (and for the real unices, someone will have a package for your OS) After reading this thread and Eric's article, I'm fired up again to learn python. -r Gaxus 07-23-2003, 11:04 AM I've done some dabbling in python for a while and I just started to learn perl today :D. Perl seems very similar in syntax to C/C++ yet is easier to use than said language. I agree, python is infinately more cleaner when it comes to code layout! Curley braces, pffft- who needs em ? :D Now, I was just messing around and came up with these two progs that should do the same- lets see which one looks easier to understand. #!/usr/bin/perl @array = ("one", "two", "three"); for ($z=0; $z<3; $z++) { print $array[$z], "\n"; } #!/usr/bin/python array = ("one, "two", "three") for z in range(3): print array[z] Of course... seeing that I've just started to learn perl, I can't comment on which of the two is more powerful. bascule 07-23-2003, 11:41 AM Python is definitely the one to learn, I'm trying just now, but perl is better at network scripts for large system administration, as far as I know. The perl vs. python flame war has been raging in usenet for years now, look it up. Python has far clearer syntax and it's so much more powerful according to scripters I know... bwkaz 07-23-2003, 08:58 PM Originally posted by tanna I don't see a slideshow! bad link. :) Gah! OK, I'm an idiot, and missed the first "w". :o The link is fixed now. Gaxus 07-24-2003, 03:28 AM I also think the level of support documentation for python is great. The official webpage makes it simple to navigate and search. There are good quality tutorials it gives links to as well as easy to follow references. All of this only helps to increase speed and ease at which you can learn the language. Strike 07-24-2003, 01:00 PM Originally posted by trashthing hi. i have seen alot of people starting to use Python. i looked at it but, didn't do much with it, that is because i use Perl. with all these people using Python, should i study Python instead of Perl? In a word, yes. kmj 07-24-2003, 01:01 PM I love python for precisely the reason MMA says he doesn't like it. It has minimal syntactic garbage... it's as close to executable pseudocode as I've ever seen. why have { and } in your code when you don't need them? You have to indent your code anyway, no matter what language you're using.. so why not just make it part of the language? Python is by far the most readable language I've ever encountered. For the above reason, and because it's the antithesis of Perl's "TMTOWTDI" ("there's more than one way to do it")... Python tries hard to make the core of the language as small and simple as possible, so that when reading someone else's code, you easily know what's going on.. in perl, everyone has their own way of implement, for example, a switch statement... this philosophy doesn't help maintainability at all. It's docs are fantastic, as people have said.. the standard libraries are quite extensive, and there are many many third party libraries. Unless you're writing an operating system (or realtime), python can do it, and make it easy. But, most importantly: python is downright fun. It doesn't get in your way. Perl can do anything Python can and vice versa, but perl always felt it was in my way.. (and at the time, perl's implementation of object oriented programming just seemed horrid). Also, as mentioned, perl coders are still more marketable than python coders, if that's what you're looking for. I like just about every language I've ever coded in, but Python is the only one I love. trashthing 07-26-2003, 11:07 AM i don't want to replace Python w/ Perl, but i'm going to study Python. thanks for the data. kmj 07-26-2003, 02:12 PM Originally posted by trashthing i don't want to replace Python w/ Perl, but i'm going to study Python. thanks for the data. that's always the best thing. I never mean to tell anybody "stop using this and start using that!" But just try them.. really try them both.. code each for a week, try a similar (real) project in both languages, and you'll know which one you like better. But don't say "yeah I checked it out; it was dumb" after reading 100 lines and writing 50, every language has idioms you'll have to get used to. btw. if you know Bruce Eckel, this is a great read: http://www.artima.com/intv/tipping.html justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |