yongbin Posted November 27, 2012 Share Posted November 27, 2012 hi, I coded a shelf tool with python recently. It receives input from a user and do something depending on the input. All done with python shell. But when python wait for input, if user press esc key accidentally, then houdini freezing and down. I had some tests, and noticed it breaks only if I tried to 'import' codes. If I code and run only inside of houdini's interactive python shell, then esc key doesn't break houdini. But after I copy it to shelf. Play. Then esc leads houdini break. anyone know this problem, or how can fix it? need some help Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted November 27, 2012 Share Posted November 27, 2012 The Python documents explain it fairly well. See the section about handling exceptions. http://docs.python.org/2/tutorial/errors.html Quote Link to comment Share on other sites More sharing options...
yongbin Posted November 28, 2012 Author Share Posted November 28, 2012 Thank you lukeiamyourfather i tested try: raw_input('test') except: print("can't use esc key") but still houdini freeze. Is there something I misunderstood? 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.