Houdini terminal output on Windows

   7414   6   2
User Avatar
Member
4 posts
Joined: Sept. 2010
Offline
I've mostly used Houdini on Linux, but I'm now using it on windows and I'm trying to set it up so that the terminal output goes back to a shell.

I can launch Houdini from PowerShell or command prompt, but the terminal output still goes to the floating window instead of back to PowerShell. I tried playing around with some environment variables (HOUDINI_DISABLE_CONSOLE, HOUDINI_TEXT_CONSOLE, and HOUDINI_WINDOW_CONSOLE) but no matter what I set them to, I can't get the text to go back to the shell.

Anyone else tried this and have any insights?
James Littlejohn

www.jameslittlejohn.com
User Avatar
Member
333 posts
Joined: Oct. 2012
Offline
you might want to get cygwin so you get a real terminal.

www.cygwin.com
User Avatar
Member
20 posts
Joined: Sept. 2012
Offline
I would be interested to know the same. Since Houdini default console window disappear sometimes. The suggestion about cygwin doesn't make sense since Houdini binary seams like doesn't write to stdout. I looked at the houdini.exe flags but I don't see anything related to console output.
User Avatar
Member
380 posts
Joined: July 2005
Offline
Anything come of this?

I have a .bat file I run from the houdini CLT or cmd terminal to config and fire up Houdini.
I was also a bit surprised to discover this in a move from linux to windows.
I just assumed I'd be able to see some output in the shell I launched Houdini from akin to linux.

For me, Python2.7 sys.stdout is captured all at once and output only to the Python Shell Pane when a process completes. This is certainly not as nice as linux, where you can see stdout/err stream to the shell wherever your print statements or logging is firing from. I can only seem to get the Houdini Console to capture vex/dso printf.

I also gave cygwin a quick try by sourcing houdini_setup from the installation directory and running the following simple progbar test. When running with a python interpreter in the winblows cmd terminal, it overwrites the same line as expected.

import sys
import time
import logging

log = logging.getLogger()
log.info("HELLO?")
print("WORLD")

iters = 500
# sys.stdout carriage return, no newline, overwrites the line
for k in range(iters+1):
    pct = float(k)/iters
    msg = "\r running {:.2%} {}/{}".format(pct, k, iters)
    sys.stdout.write(msg)
    sys.stdout.flush()
    time.sleep(0.001)

Run from a shelf, this does bring up a Houdini Console Window for me, but it doesn't stdout to the cygwin terminal.
Each line is flushed and echoed to the Houdini Console separately, which is a bit better than a process dump, but incomparable to working on linux in the first place. The Houdini Console looked to max out at something like 250 lines for me, I cant seem to get a logger to output anything, and print statements are not output to the Houdini Console - those are output to the Python Shell Pane along with all the sys.stdout when the process completes as before.

I'm going to try and attach a VSCode debugger and see if that better facilitates a code trace.
Edited by sdugaro - March 23, 2021 23:48:53
User Avatar
Member
78 posts
Joined: May 2018
Offline
Sorry to poke such an old thread, but I was wondering if anyone figured out how to get this working? We are using a .bat file as well and it really sucks having to have multiple consoles open when launching Houdini in Windows.
User Avatar
Member
4 posts
Joined: Sept. 2010
Offline
No idea myself, I think I gave up on this not too long after I posted about it.
James Littlejohn

www.jameslittlejohn.com
User Avatar
Member
793 posts
Joined: April 2020
Offline
Not sure if this helps, but I am running houdini through a wrapper ( a little Qt ui to select versions etc) and capturing std out and std err works great there:

self.process = QtCore.QProcess()
...
self.process.readyReadStandardOutput.connect(self.HandleStdOut)
self.process.readyReadStandardError.connect(self.HandleStdError)
  • Quick Links