Upload
dyani
View
38
Download
0
Tags:
Embed Size (px)
DESCRIPTION
python. TM. for technical artists. Adam Pletcher Technical Art Director, Volition, Inc. / THQ [email protected] www.volition-inc.com. Background. Myself Python @ Volition MaxScript Tech Art Council Programming Classes Future Engine Toolset. Key Features. Dynamic Typing. - PowerPoint PPT Presentation
Citation preview
Adam PletcherTechnical Art Director, Volition, Inc. /
www.volition-inc.com
pythonTM
for technical artists
Background• Myself• Python @ Volition• MaxScript• Tech Art Council• Programming Classes• Future Engine Toolset
Key FeaturesDynamic Typing
>>> spam = 32.38>>> print spam32.38
>>> spam = "Three, sir.">>> print spamThree, sir.
Key FeaturesClear Syntax
for (int i = 0; i < 6; i++){ avgColor += colorArray[i];}
for c in colorArray: avgColor += c
C#:
Python: No braces?!
Key FeaturesIntrospection>>> val = 32.38>>> 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 FeaturesReal 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 FeaturesClasses, Inheritance• No more structs-as-classes (MaxScript)
Extendable• Add functionality with C, C++, Python packages
Embeddable• Python scripting in your application
Key FeaturesGinormous Standard Library• Manipulate text, binary, XML, HTML, ZIP files• Send & receive email• Dates & times• GUI toolkit• Data Persistence/Serialization• Internet access, networking• Multi-threading • Unit testing framework (two, actually)
Key FeaturesThird-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 FeaturesPython is FUN• Feel more productive• Fits your brain• Huge community
DemonstrationsScripts for Tech Artists• Data mining• Screen scraping • Data persistence (serialization)• Using GUIs• Texture validation, comparison• Databases• COM integration with 3ds Max
Official Python Site – www.python.org (try the tutorials)Dive Into Python – www.diveintopython.org
ActiveState Cookbook –http://aspn.activestate.com/ASPN/Cookbook/Python/
Guide to Python Introspection –http://www.ibm.com/developerworks/linux/library/l-pyint.html
Large collection of Python Tutorials –http://python.objectis.net/
Web
Python Resources
Books
Python Resources
Learning Python, 3rd Ed., Mark LutzPython Programming for the Absolute Beginner, Michael Dawson Python Programming in Win32, Mark Hammond, Andy RobinsonProgramming Python, 3rd Ed., Mark LutzBeginning Python: From Novice to Professional, Magnus Lie Hetland
Python ResourcesUseful ExtensionswxPython - http://www.wxpython.org/Python Win32 - https://sourceforge.net/projects/pywin32/Python Imaging Library - http://www.pythonware.com/products/pil/MySQLdb - http://sourceforge.net/projects/mysql-pythonPyExcelerator - http://sourceforge.net/projects/pyexceleratorPygame - http://www.pygame.org/Py2exe - http://www.py2exe.org/Pyro (Python Remote Objects) - http://pyro.sourceforge.net/
www.volition-inc.com/gdc• All code examples• Powerpoint slides• Extra goodies
Questions?adam@volition-
inc.com