LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Python/perl coding guides? (https://www.linuxquestions.org/questions/linux-newbie-8/python-perl-coding-guides-478416/)

Michael_aust 08-29-2006 08:36 AM

Python/perl coding guides?
 
I figured that it might be a good idea for me to expand my knowledge of GNU/Linux and computers in general more, by undertaking some kind of project. I came to the conclusion that learning the basics or python or perl would be a good start.

I know with python you can program applications as well as scripting (I think) and that perl is used for writing scripts (I think). Now what can any suggest any guides (preferably printed books) that are a good start for learning either python or perl?

Forgot to mention preferably guides with tutorials in them.

Thanks in advance

Michael.

tuxrules 08-29-2006 08:54 AM

Quote:

Originally Posted by Michael_aust
I figured that it might be a good idea for me to expand my knowledge of GNU/Linux and computers in general more, by undertaking some kind of project. I came to the conclusion that learning the basics or python or perl would be a good start.

I know with python you can program applications as well as scripting (I think) and that perl is used for writing scripts (I think). Now what can any suggest any guides (preferably printed books) that are a good start for learning either python or perl?

Forgot to mention preferably guides with tutorials in them.

Thanks in advance

Michael.

Both can be used for dirty (read quick) scripts and full-fledged programs. For Perl, look at dvdrip which is almost entirely in Perl. I am sure there are programs that are built using Python. In my opinion, the best starter book for perl is O'Reilly's Learning Perl by Randal Schwartz and others. Search on Amazon. I've also heard good reviews about APress's Beginning Python by Magnus Lie Hetland.

Tux,

soggycornflake 08-29-2006 01:30 PM

I would highly recommend starting with Python. Only use Perl if you are bald (because it will make you tear all your hair out very quickly...;)).

Python is much easier to learn than Perl. It is bundled with a tutorial (online version here) which is enough to get started, and a reference manual, which is not much good for learning from but it will help you when you need to understand the syntax. Also, Python has a builtin command line so it can be used interactively, which is invaluable for experimenting and testing.

OTOH, Perl, it has to be said, is a powerful language, and it's worth at least tinkering with it (I tend to stick to one-liners myself, I use Python for anything more complicated).

I have Programming Perl and Programming Python but I've only read a little of each, so can't say much about them yet. The two Learning books tuxrules mentioned are probably better places to start.

muddywaters 08-29-2006 02:40 PM

Not to dissuade you from buying a book (especially O'Reilly books), but some of the on-line tutorials are very good starting places. However it helps if you have a second computer (or monitor) or access to cheap printing.

If you (like me) have very little programming experience this is worth a look:

http://www.livewires.org.uk/python/

It is designed as a python primer. By the fourth page you will be creating something very much like the robots game included in the current ubuntu.

Why not have a bit of fun before getting into the heavy slogging?

OTOH, if you have experience programming in another language it may just seem silly. I'm sure a few eyebrows were raised when I offered this link in the programmers forum :)

Michael_aust 08-29-2006 03:10 PM

muddywaters I have a little programming experiance. I did a year with Turbo Pascal for college and made a system for a video rental store for the coursework (everybody picks this as the coursework to do). But that was two years ago and have no touched programming since very much, other then the programming module on my uni degree. However I was more interested in the design/Testing/Analysing part of the module then the actual coding, as we were using Java and it made no sense to me.

From what I have seen so far of python, it looks ideal as it's very similar to Turbo Pascal in terms of syntax and things.

I will check out the books that have been suggested.

Thanks very much

tuxrules 08-29-2006 03:41 PM

Slashdot article that talks about Python. You would find invaluable info if you go through the comments.

Tux,


All times are GMT -5. The time now is 03:20 AM.