Atom Posted December 12, 2014 Share Posted December 12, 2014 (edited) Hi All, As a python programmer I often use print(dir(var)) to see what other options are a vailable. This does not seem to work in Houdini. Most of the time I get the error dialog claiming that str object is not callable. Does anyone know why this useful tool is not implemented in Houdini? Edited December 15, 2014 by Atom Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted December 12, 2014 Share Posted December 12, 2014 Hi All, As a python programmer I often use print(dir(var)) to see what other options are a vailable. This does not seem to work in Houdini. Most of the time I get the error dialog claiming that str object is not callable. Does anyone know why this useful tool is not implemented in Houdini? As a python programmer, you seem to override dir or print build-in And print is a function only in Python3x, so i guess you're using from __future__ import print_function Quote Link to comment Share on other sites More sharing options...
Atom Posted December 13, 2014 Author Share Posted December 13, 2014 (edited) I am migrating from Blender to Houdini. Blender has already made the leap to python 3.0 so I guess old habits die hard. Are we still living in the python past with Houdini? I am just looking for a way to use dir so I don't have to ask a hundred questions a day... A lot of the time I could solve my own problems if I could just see what options were available within a given object/variable. No one else uses dir? Edited December 13, 2014 by Atom Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted December 15, 2014 Share Posted December 15, 2014 Just do: print dir(var) We are in python2 land in houdini. You will probably also like print help(var) if you didn't already know about that one. Quote Link to comment Share on other sites More sharing options...
Atom Posted December 15, 2014 Author Share Posted December 15, 2014 Thanks, I did not know the help(var), I'll try that. @Stalker: Also I thought the mention of future_import was a joke, sorry about that. rhetorical question, no answer needed: So why are we still running on python 2? Isn't that like coding a web page in ASP or writing code in VB6..? Quote Link to comment Share on other sites More sharing options...
Erik_JE Posted December 15, 2014 Share Posted December 15, 2014 Alot of studios have tons of code in python2 and Houdini as well. There haven't been any big reason to switch yet feature wise so easier to stick with python2. There are also some libs that don't exist for python3. Quote Link to comment Share on other sites More sharing options...
eetu Posted December 15, 2014 Share Posted December 15, 2014 The 2015 vfx reference platform will still be python 2 - http://www.vfxplatform.com/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.