Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Turn on "Frames" option for IronPython scripts #148
cross posted here.
Using GhPython, I recently tried to import a python package that I've used before, networkx, and I get this error:
A little bit of searching leads me to this example showing that the ability of a script to access its "frame" can be switched on or off by properties that are passed to the IronPython Engine upon instantiation:
This seems like a harmless and helpful change to the RhinoPython implementation, which would allow a greater use of third-party python packages. Is there any possibility of changing the current implementation?
This actually slows down script execution and I need to figure out a good way to allow this option in the rare cases that ghPython scripts would need them.
There is an option in the python script editor "EditPythonScript" options dialog that allows for turning frames on. This should globally affect the entire python system in Rhino and will probably turn frames of for ghPython scripts. Not very obvious, but the option is there.