Boston Python Workshop 5/Friday: Difference between revisions

Line 99:
</ol>
 
Hey Brock,Seems there are a few small errors with your sircpt. The most important one is that you'll want to have lines 59 and 60 all the way to the left, with no whitespace in front of it. Right now python will think these lines are still part of your class.Then in line 21 you'll need to use curly braces {} for your bl_options, rather than parenthesis ().After doing this, the sircpt will not return any errors but the button won't show. This is because on line 13 the operator should be between quotation marks so that it reads layout.operator( object.random_material )On line 48 you made a small typo (availabeMaterials, instead of availableMaterials).Lastly, on line 50 you'll want to use square brackets [] instead of parenthesis () to access the randnum key.These are all minor mistakes though, so don't get discouraged! =)
==Congratulations!==
 
You are done with the Friday portion of this Workshop. We'll see you at 9:30am tomorrow back here at MIT in ([[Boston_Python_Workshop_4#Location| room 32-155]] )! Please bring the laptop you used tonight.
 
If you have any questions, comments, or feedback on tonight's material, don't hesitate to let a staff member know.
 
[[Boston Python Workshop 5|&laquo; Back to the Workshop home page]]
Anonymous user