TypeHandle::output

Hello!

I’m doing some interrogate stuff and something looked odd to me. I see that TypeHandle::output is being published with it’s ‘ostream &’ parameter. But I’m not sure this is actually meaningful outside of C++. Is it possible to reasonably call this in Python? (or by extension any other scripting language?) Or should this be moved out of the published block?


-Frang

Hi there!

Yes, it is possible to construct or obtain an ostream in Python code (eg. StringStream, or Notify.out()), so there is a theoretical use in calling this from Python. Though it doesn’t add much in this specific case since one can just use handle.name instead. :slight_smile:

Interrogate also has some special code to register a str() or repr() based on the result of methods like output() and write(). Off the top of my head, I’m not entirely sure whether that requires it to be published. A cursory check shows that a lot of Panda classes have this method marked as published.

Okie dokie, I’ll figure out how to get that wired up.

I forgot about the Notify.out() case. Which does make some sense.

Ah! I see, it’s when interrogating dtoolutil. Ok I had been doing a handful of manual test runs and didn’t include that.