Adam Pletcher Technical Art Director, Volition, Inc. / THQ python TM for technical artists
Background Myself Volition MaxScript Tech Art Council Programming Classes Future Engine Toolset
Key Features Dynamic Typing >>> spam = >>> print spam >>> spam = "Three, sir." >>> print spam Three, sir.
Key Features Clear Syntax for (int i = 0; i < 6; i++) { avgColor += colorArray[i]; } for c in colorArray: avgColor += c C#: Python: No braces?!
Key Features Introspection >>> val = >>> help(val) Help on float object: class float(object) | float(x) -> floating point number | | Convert a string or number to a | floating point number, if possible. | | Methods defined here: etc…
Key Features Real Exception/Error-Handling System try: myList.append(val) except AttributeError: print 'Oops, "myList" needs to be list type!' print 'It was type', type(myList), 'instead.' except: raise
Key Features Classes, Inheritance No more structs-as-classes (MaxScript) Extendable Add functionality with C, C++, Python packages Embeddable Python scripting in your application
Key Features Ginormous Standard Library Manipulate text, binary, XML, HTML, ZIP files Send & receive Dates & times GUI toolkit Data Persistence/Serialization Internet access, networking Multi-threading Unit testing framework (two, actually)
Key Features Third-Party Extensions Windows win32 API COM, app. automation (MS Excel, etc.) Image manipulation More GUI toolkits, RAD designers Source control Databases Reports & graph generation
Key Features Python is FUN Feel more productive Fits your brain Huge community
Demonstrations Scripts for Tech Artists Data mining Screen scraping Data persistence (serialization) Using GUIs Texture validation, comparison Databases COM integration with 3ds Max
Official Python Site – (try the tutorials) Dive Into Python – ActiveState Cookbook – Guide to Python Introspection – Large collection of Python Tutorials – Web Python Resources
Books Python Resources Learning Python, 3rd Ed., Mark Lutz Python Programming for the Absolute Beginner, Michael Dawson Python Programming in Win32, Mark Hammond, Andy Robinson Programming Python, 3 rd Ed., Mark Lutz Beginning Python: From Novice to Professional, Magnus Lie Hetland
Python Resources Useful Extensions wxPython - Python Win Python Imaging Library - MySQLdb - PyExcelerator - Pygame - Py 2 exe - Pyro (Python Remote Objects) -
All code examples Powerpoint slides Extra goodies Questions?