Python Quick Tip – dir() function
**This tutorial was done by python guru Matt Pearson. Check out his website for more Python goodness**
So you get a buddies python script that he promised would solve all of your problems. You import it into C4D but either you can’t remember, or you were never instructed which function to call that will save your life. What the flip! Well the nicest little, rarely remembered, function exists to help you. Python has a built in function known simply as dir(). This little guy will return to you a list of names of all attributes found in the called script or module. There we go, I found it, I probably have to run createUI to get access to this tool.
If you use it without an argument it will return you a list of modules or variables existing in the local scope. I use this all the time to make sure that I have a specific module imported before I start to write a ton of code and when I go to execute it I get an error dropped on my head.