> > Can you exclusively use Python? > > I have yet to try using Python as my default shell, but it -may- be > doable.
It is of course possible to get a Python prompt as your default shell instead of bash. Just replace the default shell in /etc/passwd (this is for Slackware). But of course, exec'ing Linux OS commands from the Python command line would be real klunky. > > Or can you somehow embed Perl in ways and tasks where Python is > > deficient? > > I would personally not embed Perl into Python. If for some reason I find > that Perl fills in a spot where Python is deficient (note the if), then > I'll use Perl instead. However for most purposes it seems you'll want to > "plug in" optimized C code instead of Perl to speed processor-intensive > tasks up, and this Python can definitely handle. I agree with Jijo, I see no point in 'embedding' one into the other and if it were possible would probably be really yucky and inelegant. For my money, anything Perl can do Python can too and in the vast majority of cases the Python code will look cleaner and you will have an easier time coding in it. Perl's advantages over Python are becoming more and more niche as time goes by. But to recap, these would be: * intensive text processing which uses Perl's *really* exotic features Python's regex module already contains far more features than I have ever needed. Also, because of Python's design, you don't have to resort to using them as much as you would Perl. In truth, I have yet to resort to using its regex module! With Perl, my code quickly devolved into a mess of incomprehensible regexes virtually from day one. * speed Perl is still supposed to be a fair amount faster than Python. But then, speed is not the reason you're using a scripting language, is it? I have to say that the advantages brought about by Python's powerful *AND* clear syntax (Perl syntax is powerful but the antithesis of readable) is well worth any speed hit you incur. Take it from someone who once thought scripting languages were for lamers who weren't good enough to code in C and thus had to live with slow programs. As early as trying out Perl, I was sold on scripting languages - they just make things sooooo much easier. I guess I'm one of these lamers now... :-). * availability Python was not as standard-issue as Perl used to be... but nowadays I think it's safe to assume its presence on just about all distros. Still a LOT of legacy Perl code out there, so there's still a future for those who know Perl, but I strongly feel the momentum is on the side of Python. I've been using Python for almost 3 years now and I still can't stop raving about it. In fact there's more to rave about as time goes by. Perl may still be king in some niches like bioinformatics where its text processing abilities seem well suited for DNA sequencing related stuff, but I have to say that Python is more generally desirable just about everywhere else. I also would like to say that the Python experience completely demolishes Larry Wall's thesis about how striving for language orthogonality is the wrong approach. I had a love/hate relationship with Perl - its powerful features are intoxicating but its abstruse, impossible-to-guess syntax has caused so much frustration that it makes me want to strangle its creator(*). With Python, it's unequivocally a love-love thing and definitely no infatuation. ============================================================================ (*) Especially when I recall how I bought into his rambling essays justifying the philosophy behind Perl's design - God, I just feel gypped! To be fair, if GvR hadn't come along with Python, Larry Wall might still have been my hero and if I hadn't tried out Perl, it would probably still be Stroustrup. That final thought sends a cold shiver down my spine, btw... shudder-r-r... _ Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph To leave: send "unsubscribe" in the body to [EMAIL PROTECTED] Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph To subscribe to the Linux Newbies' List: send "subscribe" in the body to [EMAIL PROTECTED]
