print 'Oops, 'myList' needs to be list type!' print 'It wa - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

print 'Oops, 'myList' needs to be list type!' print 'It wa

Description:

print 'Oops, 'myList' needs to be list type!' print 'It was type', type(myList), 'instead. ... No more structs-as-classes (MaxScript) Extendable ... – PowerPoint PPT presentation

Number of Views:98
Avg rating:3.0/5.0
Slides: 18
Provided by: adam185
Category:
Tags: list | mylist | needs | oops | print | type

less

Transcript and Presenter's Notes

Title: print 'Oops, 'myList' needs to be list type!' print 'It wa


1
(No Transcript)
2
python
TM
for technical artists
Adam Pletcher Technical Art Director, Volition,
Inc. / THQ adam_at_volition-inc.com www.volition-inc
.com
3
Background
  • Myself
  • Python _at_ Volition
  • MaxScript
  • Tech Art Council
  • Programming Classes
  • Future Engine Toolset

4
Key Features
Dynamic Typing
gtgtgt spam 32.38 gtgtgt print spam 32.38 gtgtgt spam
"Three, sir." gtgtgt print spam Three, sir.
5
Key Features
Clear Syntax
C
for (int i 0 i lt 6 i) avgColor
colorArrayi
Python
No braces?!
for c in colorArray avgColor c
6
Key Features
Introspection
gtgtgt val 32.38 gtgtgt help(val) Help on float
object class float(object) float(x) -gt
floating point number Convert a string
or number to a floating point number, if
possible. Methods defined here
etc
7
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
8
Key Features
  • Classes, Inheritance
  • No more structs-as-classes (MaxScript)
  • Extendable
  • Add functionality with C, C, Python packages
  • Embeddable
  • Python scripting in your application

9
Key Features
  • Ginormous 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)

10
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

11
Key Features
  • Python is FUN
  • Feel more productive
  • Fits your brain
  • Huge community

12
Demonstrations
  • Scripts for Tech Artists
  • Data mining
  • Screen scraping
  • Data persistence (serialization)
  • Using GUIs
  • Texture validation, comparison
  • Databases
  • COM integration with 3ds Max

13
(No Transcript)
14
Python Resources
Web
Official Python Site www.python.org (try the
tutorials) Dive Into Python www.diveintopython.o
rg 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/
15
Python Resources
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
16
Python Resources
Useful Extensions wxPython - http//www.wxpython.o
rg/ Python Win32 - https//sourceforge.net/project
s/pywin32/ Python Imaging Library -
http//www.pythonware.com/products/pil/ MySQLdb -
http//sourceforge.net/projects/mysql-python PyExc
elerator - http//sourceforge.net/projects/pyexcel
erator Pygame - http//www.pygame.org/ Py2exe -
http//www.py2exe.org/ Pyro (Python Remote
Objects) - http//pyro.sourceforge.net/
17
www.volition-inc.com/gdc
  • All code examples
  • Powerpoint slides
  • Extra goodies

Questions? adam_at_volition-inc.com
Write a Comment
User Comments (0)
About PowerShow.com