Jump to content

[SOLVED]Why doesn't print(dir(myvar)) work in Houdini?


Atom

Recommended Posts

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 by Atom
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by Atom
Link to comment
Share on other sites

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. :wacko:

 

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..?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...