Welcome, Links to Python Resources

Welcome to the Python forum on TAO.

I’d like to post a sticky, growing list of useful Python-related links. If you’re new to Python or looking to dig deeper, these should point you in the right direction.
I’ll archive the most useful links on the TAO Wiki, but this thread can remain an informal starting point.

New/Learning Python
Official Python site - Great place to start
Python.org Online Documentation
Official Python tutorial
Dive Into Python - Excellent site/book for novice Python users

Python Extensions
Python Package Index - AKA the Cheese Shop. Large list of extension packages available for Python
Python Win32 - Definitive extensions for working with Windows
wxPython - Popular choice for developing GUIs.
Python Imaging Library (PIL) - For working with images, texture files
SQLAlchemy - Excellent SQL database toolkit
PyExcelerator - Great for working with MS Excel documents
Pygame - Game framework for Python
Py2exe - Compile Python scripts into EXEs
Twisted - Event-driven networking engine

Books
Learning Python, 3rd Ed., Mark Lutz
Python Programming for the Absolute Beginner, Michael Dawson
Python Programming in Win32, Mark Hammond, Andy Robinson
Programming Python, 3rd Ed., Mark Lutz
Beginning Python: From Novice to Professional, Magnus Lie Hetland

Python Tools
Wing IDE - Excellent Python IDE with full debugger and remote debugging ability
SWIG - “Glue code” generator for binding Python to C and C++
Boost.Python - Another glue code option.

[more to come]

Thanks Adam!

These links were helpful to me::

http://www.volition-inc.com/gdc/GDC2008_AdamPletcher_PythonForTechArtists.ppt
http://www.volition-inc.com/gdc/GDC2008_AdamPletcher_PythonSamples.zip

:wink:

Seriously though, it was super helpful for me to see how someone else was using python in a production environment. After looking at your sample files, I was able to whip up some python tools that have already saved us hours and hours. Thanks a lot for sharing.

I think it would also be cool to start a thread for Python success stories - for people to share cool things that they’ve done in Python to save time, make work-flows more smooth, etc.

-Ben

[QUOTE=bcloward;100]

I think it would also be cool to start a thread for Python success stories - for people to share cool things that they’ve done in Python to save time, make work-flows more smooth, etc.

-Ben[/QUOTE]

This is a great idea Ben. Not only would this show the capabilities of Python but also encourage new and existing Python users to experiment.

Thanks Adam! This is a great baseline for picking up Python. I remember reading your lecture on Python for Technical Artists from GDC 08 that Ben linked and it really got my brain workin. Hopefully I’ll be able to pick up a good starting point from all these resources as I haven’t really touched Python much.

IronPython - Very useful if you do much work with FX Composer 2.x

Python for .NET (or just Python .NET) - A good way to get .NET support into Maya and Motionbuilder

I highly recommend Mark Lutz’s books. He’s pretty much the definitive python teacher, short of going to Guido himself!

I also recommend:
Painless Python for Proficient Programmers by Alex Martelli (Google IO conference)

It’s great for a detailed overview of the language for those familiar with other languages such as C, and it’s in video format. It’s about 2 hours in length I think, so strap in. :slight_smile:

Killer Erilaz, I’ll be sure to pick those up. Thanks for the heads up :).

Edit:
Actually I’ll chime in with a question here. Being that I’m a rather novice in the scripting/programming field, do you believe Lutz’s book is a good place to start? Does it cater towards those who have already had experiences with C# or various OOP languages? Python has always struck my fancy, but again, I’m rather new to the whole scene still.

I’m currently plowing through the MAXScript Essentials book without having any trouble understanding what’s going on (and if I don’t, I’ve been able to get further breakdowns by asking one of our programmers and figure it out shortly after). Would you say the learning curve and ramp in assumed knowledge of OOP based languages is at all equivalent to the pace of that book (assuming you’ve read or browsed through it)? If not a bit, hopefully not extremely more advanced? Thanks guys.

Python is actually probably the best language i’ve seen for learning programming from the ground up, so even if you’ve never touched stuff like this before, it’s gold. Although i’ve coded in various languages, I could see this as a really great starting place for beginners or advanced. He doesn’t dumb it down, but you’re not left behind either.

I actually learned a lot more about how C++ works just by reading Mark’s Python books. Python is essentially a lot simpler, a lot cleaner to read (one of the main reasons for python’s existence), and a lot quicker to write.

Since OOP is a fundamental feature of Python it’s not only easy to pick up, it’s easy to make a decision as to whether you need to use it.

The advanced stuff at the end of the “Learning Python” book is a little hard to stomach, but it’s worth plowing through as “Programming Python” becomes a lot easier to work with.

More to the point, Mark writes with a sense of humour and flair that’s missing from a lot of dry programing books.

Keep in mind, i’m fairly new to Python too (I’m only halfway through “Programming Python” - It’s a huge book!). All I can say is it’s renewed my joy of programming. :):

Well I’m sold. Thanks a bunch for the summary, Erilaz. Hopefully it’ll be a smooth transition (if not, I’ll be sure to bug you with questions :laugh:).

http://www.coderholic.com/free-python-programming-books/ has a listing of free e-books for python. They range from python 2.3 -2.5. They might be a little out of date but they’re still pretty good. Well some of them, not all.

Maybe it was already posted somewhere, but in case it hasn’t…

Python scripting for maya artists

oooh, this should be quite useful. Thanks!

anyone have any suggestions for books on data structures\algorithms?

Algorithms in C++ is still one of my favs of all time. Yeah it’s C++, but the concepts are applicable all over.

Art Of Computer Programming if you can find em are also useful, but SUPER dry. pure reference, they assume you have a good background already.

Thanks Seth,
I’m going to check these out on google books and get a good look at them.

thanks for all these!

i found this one tonight and it seemed like a nice group of tutorials.

http://caseyalt.com/teaching/mayapython/

I’m finding a lot of reference but actual tutorials are awesome because its the only way to learn… practice…

The lack of Eclipse and PyQT links in this thread is surprising! I think of them both as the gold standards…

ECLIPSE IDE - not only useful for Python, here at Trion it’s also used extensively for Javascript, Java/Processing, ActionScript, and it interfaces well wth Maya (both Python and Mel) and other text editors, especially (for me) Vim.

PyQT - most of our GUI-driven in-house tools for level design and so forth are written in some flavor of Qt, adding PyQt to Maya (and Eclipse) is widely done (it’s right here in the Autodesk Maya docs) and adds a lot of fast functionality. I love being able to write tools that can run inside Maya or be standalone.

Unofficial Windows Binaries for Python Extension Packages - can’t find your favorite module compiled for 2.5 or x64? look here!

pyODBC - in case you have to connect to a MS SQL server or other ODBC DBs. Works with all Maya versions

+1 to the unofficial windows binaries site, such a great find.

Google Python Style Guide - this is easily my new favorite python document online

PyCharm IDE - A recent Python IDE that Rob recommended. Has some compelling features, I’d put it almost on par with Wing or Eclipse in some respects, and surpassing in others. It’s a little obtuse and takes some digging to really get into, but the devs are super helpful and responsive. This is what we’ll be using at Riot.

PyCon Videos on blip.tv - if you’re ready to really dig in and see what the rest of the world does with Python (and even some game studios), check these out. Warning: you WILL learn something.

And to revisit this, i highly recommend:
Python Algorithms: Mastering Basic Algorithms in the Python Language

Amazon has a few other Python specific algorithm books i’ll be checking out in the near future as well.