Development Learning Python

Discussion in 'Software' started by will_123, 2 Nov 2012.

  1. will_123

    will_123 Small childs brain in a big body

    Joined:
    2 Feb 2011
    Posts:
    1,060
    Likes Received:
    15
    Anybody know any good books for this? I have pretty much worked my way through the code academy courses. Fancy getting myself a book on the subject. O'Reily seems to be the one that is advised for most things? Anybody got any knowledge on this subject?

    Thanks
     
  2. Matticus

    Matticus ...

    Joined:
    23 Feb 2008
    Posts:
    3,347
    Likes Received:
    117
    Do you know any other languages or is Python your first?

    I have been a developer since finishing Uni nearly 3 years ago and so know programming pretty well. Mainly web stuff, so PHP, .Net, javascript etc. I recently had a go at Python for a bit of fun, because I know programming already it wasn't too hard just to Google how to do X in Python to get hints at syntax and default function names.

    If you are a non programmer check this out.

    If you are a programmer, do as I did, but also check this out.
     
  3. Dae314

    Dae314 What's a Dremel?

    Joined:
    3 Sep 2010
    Posts:
    988
    Likes Received:
    61
    Python's become a pretty popular language, and there's tons and tons of tutorials all around the web. Unless there's a specific reason why you want to get a book, I would go with something online just because it's free and *may* be more up to date.

    I personally learned python from http://getpython3.com/diveintopython3/

    However, that site might be a tiny bit out of date since I think it uses Python 3.2 and the newest that just got released is python 3.3. Of course the python docs are a fine tutorial too.

    Sorry I can't make a better recommendation on paper books... I didn't use one so I really can't tell you which are good :p. By the time I was learning python I had already learned several other languages, and I was at the point where I could have probably just kept the docs open while I coded and been fine...
     
  4. will_123

    will_123 Small childs brain in a big body

    Joined:
    2 Feb 2011
    Posts:
    1,060
    Likes Received:
    15
    Well I have done some C++ at uni and more at home. So im familiar with functions, variables etc. I like the idea of a book, just because I like reading before my bed. But might have a look at some online material. Like I said I was doing the code academy stuff to get my head around python to start with. I deal with a lot of Linux and thought a scripting language could really help with my server maintenance at work.
     
  5. lp rob1

    lp rob1 Modder

    Joined:
    14 Jun 2010
    Posts:
    1,530
    Likes Received:
    140
    If you are going to be scripting for a Linux system, then there is really no better option than using Bash or another shell. Simple syntax, easy to maintain, and direct access to system level tools that you use in the terminal. Bash is my language of choice for scripted things. Higher up I would go for C++, or perhaps Lua (in certain scenarios). I would like to learn Python to add another language to my repertoire, but IMO Python sits in the 'middle-level' languages, while Bash is a very high level language.
     
  6. Dae314

    Dae314 What's a Dremel?

    Joined:
    3 Sep 2010
    Posts:
    988
    Likes Received:
    61
    I'm in complete agreement with rob on this topic now. If you're doing scripting in linux, you should use the shell if you can. Not only is it basically universally supported on linux systems, it's also very powerful and strongly integrated into Linux.

    Python is completely one of those strange in-between languages. People aren't sure what to use it for. Because it's interpreted, if you're crunching lots and lots of data you probably want to use a different language, but because it's interpreted you're able to churn out very complex programs in a matter of minutes thanks to the intuitive, flexible syntax. Most of the practical application I've seen python used for has been on web servers to make short scripts to process something. Python isn't really a web language, but people have started to use it in that area just because it kinda sorta fits :p.
     
  7. lp rob1

    lp rob1 Modder

    Joined:
    14 Jun 2010
    Posts:
    1,530
    Likes Received:
    140
    This is what I use to solve a particular problem:
    Take input from user, spit out data, or parsing data - Bash
    Fancy regexes and more complex tasks - Perl
    High performance code, or low level code - C++
    Dynamic web pages - PHP (but I am opening to the idea of using CGI and Bash to do this - I am more familiar with Bash than PHP)
    Other web page stuff - HTML and CSS

    That covers most of my usage scenarios. As mentioned above - I want to learn Python at some stage, simply because it is a common language and understanding code is as useful as writing new code - so it would be beneficial to learn Python. Then again, this can be said for any common language, but for starting out I would recomment Bash, C++ or PHP, depending on the area that you want to start off in.
     
  8. will_123

    will_123 Small childs brain in a big body

    Joined:
    2 Feb 2011
    Posts:
    1,060
    Likes Received:
    15
    I can do a little bash, not that good though.Just written a few scripts before to check for services running. Maybe it would be best to focus my efforts there rather than look at python. Thanks
     
  9. PsYcHoTiC_MaDmAn

    PsYcHoTiC_MaDmAn Unholy Cyborg Fruit Machine

    Joined:
    11 Jan 2011
    Posts:
    290
    Likes Received:
    10
  10. fdbh96

    fdbh96 What's a Dremel?

    Joined:
    29 May 2011
    Posts:
    1,894
    Likes Received:
    33
    Theres a good book, I found a pdf of it and its called how to think like a computer scientist, but a python version rather than javascript. It may be a bit basic at first but it helped me a lot when learning python.

    As others have said though, I never really knew what to do with python when I learned a bit of it.

    I think this is it...
    http://www.greenteapress.com/thinkpython/thinkCSpy/thinkCSpy.pdf
     

Share This Page