in the dev mode of ghpython, the
sys library doesn’t seem to work properly unless recompile (press “test” button)
the regular procedural mode seems to work ok
any ideas? is this an expected behavior? what’s my option around it?
Sorry I don’t know right now, could you post the definition to repeat?
What happens if you write “import sys” inside the
for Robert McNeel & Associates
Thanks for the suggestion. It did not work. However when I restarted Rhino and re-wrote that example script in my OP, it worked. I thought reboot solved it but I opened up my more complex script, which is simply too gigantic to post here, the same problem persisted. I even searched through my script and looked for potential variable names I might have declared as “sys” but that was also not the case…
My way around it is in the
__init__() method of
self.sys = sys and calling
Strangely enough, I used the following line in the
import section of the code and it runs so smoothly…
from sys import exc_info as errinfo # some code.... # ... line_of_err = errinfo().tb_lineno # that just runs...
Then I don’t know, sorry. Then it really must be something happening deep inside IronPython. If this works, then let’s not change it . The
sys module it somehow special I think.