Where can I find good tutorial for starting to use Python with Blender?

I have worked through some basic (non-Blender) Python tutorials and would like to learn how to use it with Blender. I’d like to get to the point where I could use Python “on-the-fly” in Blender, as a way to assist in modeling. For instance, I realized the other day that I would like to select the longest edge in a mesh, and this must be fairly simple to do with a few lines of Python.

Any suggestions for good tutorials? Thanks.

If you know python then you really only need to know the Blender API’s to see what you can do with them. When I started I found this helpful for showing possibilities. http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Advanced_Tutorials/Python_Scripting/Export_scripts

I’m not sure how up-to-date it is but I think the general concerpts are still sound.

the official docs are great:
http://www.blender.org/documentation/250PythonDoc/

especially

  • Blender/Python Quickstart: new to blender/scripting and want to get your feet wet?
  • Blender/Python API Overview: a more complete explanation of python integration
  • Blender/Python Addon Tutorial: a step by step guide on how to write an addon from scratch
  • Blender/Python API Reference Usage: examples of how to use the API reference docs

The Python Console inside of blender is also a great tool for testing, mainly because of the auto-complete (Ctrl+Space)

Patrick Boelens (I think that’s how you spell his name) did a very good introductory series of tutorials. The first is here. It’s for the game engine, but has really good general advice too.

I found this http://airplanes3d.net/pydev-000_e.xml to be a great resource about writing add-ons in python.

Alessandro

First you need make sure you know python well enough , I have made a book for total begineers here -> http://wiki.blender.org/index.php/User:Kilon/Python_book_of_magic . Suffice to say if you dont know the basics I teach in this book, you are not ready to code for blender at all.

Second you will need something to teach you the basics of the Blender API -> http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Cookbook/Code_snippets

and last but not least you will need to study the api itself -> http://www.blender.org/documentation/blender_python_api_2_64_release/

From there on , studying addons source code is a good practice and you will find tons of them included with blender or distributed online.