You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.
Hello, I know it's been two years, but has this been addressed? I would like to use the timeit.timeit method and I'm running into the same namespace error the parent had: I cannot import methods from main. Is there a way to achieve this?
Hi @saeranv, I had actually looked at this and our is a different case.
The 'real' reason is that there is no main. And there is no main because in GhPython there is no file: you can imagine it as code were run from the 'exec' function.
However, this is usually a minor problem. We can work around this (now; I think earlier the version of timeit was not supporting IronPython).
http://www.grasshopper3d.com/forum/topics/performance-profiling-in-ghpython
From a quick check, it seems that the solution is outlined in answer 1:
http://stackoverflow.com/questions/8264596/how-do-i-set-name-to-main-when-using-ironpython-hosted
The text was updated successfully, but these errors were encountered: