Achayan Posted November 30, 2010 Share Posted November 30, 2010 Hi all, I am facing a problem with houdini , in windows there is a console window where we can see all the prints .In linux there is no console window any way so i am trying to load houdini with terminal , but as soon as houdini opened , terminal will not receive any traceback . Any idea how i can get all the error and prints from houdini to terminal oru something else ? Thanks Quote Link to comment Share on other sites More sharing options...
Div Posted November 30, 2010 Share Posted November 30, 2010 (edited) I'm not sure to understand why you're not able to see logs and errors on the terminal... That should works by default... If you're looking for the prints from your python code that should also appear on a python shell... Hope that help Edited November 30, 2010 by Div Quote Link to comment Share on other sites More sharing options...
Achayan Posted December 1, 2010 Author Share Posted December 1, 2010 I am not sure whats happening , I am using this command in terminal to start houdini source /opt/hfs****/houdini_setup houdini but once houdini started then terminal will not output anything .. Say for example I am creating some new python operator type and I want to see the prints where I can see that ? I am not using python shell to write the operator type any way right ? Thanks I'm not sure to understand why you're not able to see logs and errors on the terminal... That should works by default... If you're looking for the prints from your python code that should also appear on a python shell... Hope that help Quote Link to comment Share on other sites More sharing options...
graham Posted December 1, 2010 Share Posted December 1, 2010 Houdini should always uses stdout to output Python messages. When you have an instance of a Python Shell pane tab open and active, stdout gets redirected to that tab. If you close the tab or move to another tab in that group and it is hidden then Houdini will go back to the system stdout, in the case of Houdini launched from a terminal that means the console. If you aren't getting that then it's a problem. Can you see your print output with a Python Shell tab open? You can see what Python is pointing to by looking at sys.stdout. When you have a Python shell open and active and print sys.stdout you should get the following in the Python Shell. <hou.ShellIO; proxy of <Swig Object of type 'HOM_ShellIO *' at 0x25a5a00> > If there is no Python Shell open printing should give you this in the console. <open file '<stdout>', mode 'w' at 0x7f25c95c7150> To see what you are redirecting to without a shell open you can create a shelf tool and set it to run the following code: import sys hou.ui.displayMessage(str(sys.stdout)) It should say what I've got above, if it doesn't there there's a problem. Though if it does and you still aren't getting output then I guess there's another problem too. Quote Link to comment Share on other sites More sharing options...
Achayan Posted December 1, 2010 Author Share Posted December 1, 2010 Hi Graham, import sys hou.ui.displayMessage(str(sys.stdout)) This is working perfect its giving me a dialogbox still no message to terminal or python shell and I have a python shell tab opened always. *****@****-laptop:~/Desktop$ ./houdini.sh The Houdini 11.0.547 environment has been initialized. *****@****-laptop:~/Desktop$ You can see that terminal output its just out from houdini anyway . But node showinf error and I middle click there I can see and its not really help me some time because if its playing with some amount of points they its not working too I am not sure what happening and if use import sys # This code is called when instances of this SOP cook. geo = hou.pwd().geometry() #hou.ui.displayMessage(str(sys.stdout)) # Add code to modify the contents of geo. sys.stderr,'Test' nothing brings to anywhere Houdini should always uses stdout to output Python messages. When you have an instance of a Python Shell pane tab open and active, stdout gets redirected to that tab. If you close the tab or move to another tab in that group and it is hidden then Houdini will go back to the system stdout, in the case of Houdini launched from a terminal that means the console. If you aren't getting that then it's a problem. Can you see your print output with a Python Shell tab open? You can see what Python is pointing to by looking at sys.stdout. When you have a Python shell open and active and print sys.stdout you should get the following in the Python Shell. <hou.ShellIO; proxy of <Swig Object of type 'HOM_ShellIO *' at 0x25a5a00> > If there is no Python Shell open printing should give you this in the console. <open file '<stdout>', mode 'w' at 0x7f25c95c7150> To see what you are redirecting to without a shell open you can create a shelf tool and set it to run the following code: import sys hou.ui.displayMessage(str(sys.stdout)) It should say what I've got above, if it doesn't there there's a problem. Though if it does and you still aren't getting output then I guess there's another problem too. Quote Link to comment Share on other sites More sharing options...
Achayan Posted December 5, 2010 Author Share Posted December 5, 2010 Any ideas ? 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.