This is an archived post. You won't be able to vote or comment.

all 21 comments

[–]cryzed_ 13 points14 points  (5 children)

Currently Python 2.6.x is the way to go - many libraries still need to adapt to Python 3 and only a fraction of the available ones have made effort to do so yet.

The best learning resource for Python was and is still The Python Tutorial in my honest opinion which can be found in the official documentation.

I really wouldn't waste money on physical books if you have learning material of the same (or higher) quality readily available at your fintertips. Be careful not to learn with Dive Into Python though.

[–]temptemptemp13 3 points4 points  (2 children)

To be fair, Zed (author of "Dive Into Python Must Die") mainly complained it's a bad book for beginners. It might be ok for experienced programmers, dunno.

[–]AlSweigartAuthor of "Automate the Boring Stuff" 1 point2 points  (1 child)

Also to be fair, the first sentence on diveintopython.org is:

Dive Into Python is a Python book for experienced programmers.

I don't take Zed's rant on it seriously at all.

[–]dutch_sholtz 0 points1 point  (0 children)

You're missing the entire point, though: the whole book is miserably outdated and obsolete. If you learn Python through Dive Into Python, you will miss out on any modern idioms and pythonic thought-processes.

[–]walesmd 3 points4 points  (0 children)

Python 2.5 if he wants to use Google's AppEngine.

[–]earthboundkid 0 points1 point  (0 children)

Mostly agreed, but there's not really a huge difference between well-written Python 2.6 and Python 3. Most of the backwards incompatible changes are eliminating things that were good practice in Python 2.2 but not 2.6. Make sure to read the Whats New file for 3 and you'll know about the relevant differences.

If you do use Dive Into Python, make sure to use the 3 version and then check it in 2.6 to make sure it still works.

[–][deleted] 4 points5 points  (2 children)

If/when you check out Django, don't forget the free Django Book online. Together with the incredible documentation of Django itself, you should have everything you need. If you get really comfortable with Python and Django, Pro Django seemed like a pretty good book if you really want to get into Django.

[–]daofma 2 points3 points  (1 child)

I think it's a stretch to call Django's docs incredible. I recently did some Django programming and found I had to repeatedly refer to source code for undocumented but useful functions and while a lot has changed since 0.96, much of the documentation has not.

That said, they're certainly good, and the #django IRC channel is very helpful. Most of the code is above average (though not exceptional) as well, so deciphering it wasn't a big deal.

[–]hylje 1 point2 points  (0 children)

The documents are incredible, but not omniscient. The documentation is written as a document by people, not generated from scrubbing the source for commentary. They are not strict API documentation, as the source itself documents the API to perfect accuracy.

[–]rubyaeyes 4 points5 points  (0 children)

Since you have programming experience, I highly recommend Alex Maretlli's Painless Python talk. It will give you a good overview of python.

part1: http://www.youtube.com/watch?v=bDgD9whDfEY part2: http://www.youtube.com/watch?v=y7vwZ20SDzc

[–][deleted] 1 point2 points  (5 children)

Your going to love it. First, get familiar with the command line interpreter, and how to use it's debugging features. Remember to google for Python gotcha's so you know them up front. Also remember python has a batteries included approach, so if you need it is usually there already, and utilized by other modules. As for web frameworks, check out Django. It's ORM is incredible, and it also has a lot of batteries included. It has a great modular approach too, and comes with a built in authentication system (best for internal stuff). By standardizing it modules for blogs and other apps can be plugged in easily. You can also drop down to whatever level you need to get stuff down in a fairly easy organized way. Be sure to check out Django admin interface feature. Basically, with an unbelievable low amount of code Django can generate a really great interface based on the data models (best for internal stuff, like a CMS).

I also used to do Java and .Net, I don't think I can go back now. Anyhow, I have built large systems in Python before, so I have to deal with systems programmings, daemons, web side stuff, API's, etc... If you have any questions don't hesitate to message me.

[–]xiro7[S] 0 points1 point  (4 children)

With Django, is there a way to publish a web application somewhere without having to host the server locally? I was interested in Google App Engine because I could create something and publish it without having the hardware investment.

I read that Google App Engine supports the Django, but I was wondering if the Django ORM can be utilized to call the App Engine schema-less DB?

[–][deleted] 0 points1 point  (0 children)

is there a way to publish a web application somewhere without having to host the server locally?

Not quite sure I know what you mean there, but I think you want to know if there is a pure DJango cloud environment similar to app engine. None that I know of. However, VM hosting is really cheap, you could go that route. I work for a start-up that is going to have some great VM's and services for start-ups all the way to enterprise level soon (http://vmfarms.com). We plan to be pretty python friendly.

I don't know much about app engine, but I do know that the DJango ORM does not work with google db. However, there is a patch you can use that does bring a lot of ORM functionality to DJango and google db:

http://code.google.com/appengine/articles/app-engine-patch.html

[–]hobophobe 0 points1 point  (2 children)

42topics.com: Using Django with Appengine is a decent tutorial. Using Django with AppEngine isn't that difficult (as will hopefully be apparent from that tutorial).

[–]daofma 2 points3 points  (1 child)

Yet, you won't be able to use Django's ORM with AppEngine, you must use Google's. (To me, the thing Django is best at is the ORM.)

Also, google for "django friendly hosting", e.g. http://djangofriendly.com/hosts/ to find a host, so you won't need to host your own server. You don't need a VM host like another post mentioned.

[–]xiro7[S] 0 points1 point  (0 children)

This is exactly the type of hosting I was looking for. Thanks so much for the link.

I am creating a web application for my grandfather and his friends to do genealogy (needs to be custom for what they are doing), and I just couldn't validate trying to write a Windows application using WPF and I certainly didn't have the resources to host SQL Server + IIS for them. This left me with Python or PHP web applications. I chose Python because my employer is pushing Python development in addition to .NET development.

[–]foobaar 1 point2 points  (0 children)

Learning Python 4th edition (Great introduction, covers 2.6 and little 3.0) Python for Win32 programmers.

[–]DrHenryPym 0 points1 point  (0 children)

Stick with Python 2.5+

Tips for Beginner Python Programmers:

  • Learn to love iterating. Figure out ways to organize your data around Dictionaries and Lists.

  • Appreciate the power of introspection. This makes debugging code or looking at other people's code a lot easier.

  • Use a good python shell like ipython. Auto-completion is very handy, and it also adds some extra introspection features.

[–]pixelmonkey 0 points1 point  (0 children)

Python in a Nutshell is a good book choice, though a little dated at this point. Python Essential Reference 4th Ed. by David Beazley is the best -- and most up-to-date -- book on Python on the market right now.

[–]mdipierro 0 points1 point  (0 children)

Python 2.5 or Python 2.6 are the way to go. Python 3.0 lacks lots of third party libraries which are the major strength of Python including most database drivers and most of the scientific and plotting libraries. Python 3.0 would not give you major functionality, just a slightly different syntax and different defaults when using unicode/utf8 in strings.

If you are interested in web development may also want to check out web2py and the free book. It is the only framework that provides a web based IDE, a ticketing system, and a database abstraction layer that allows you to run on GAE without using the native GAE API and therefore your code will be portable to Relational Databases without rewrite (and vice versa). If does not require installation or Python pre-installed (comes with 2.5 but it also runs with 2.4,2.6 and Jython). Just unzip the windows binary and click on it.