Distribute Revit/Dynamo with The (Iron)Python Standard Library?

Absolutely,

Rhino ships with its own IronPython distribution here:

With the Standard Library within the Lib folder:

And the GHPython component (being a standard Grasshopper assembly called a .gha, which is essentially a .dll) goes here:

I’m not entirely sure if there is more to it and how this is all wired up within the Rhino source itself, but the GHPython component source is available here (for Rhino 5 at least, not sure if the new Rhino 6 source is open):

As you can see from the screenshot in my initial post, there is also the standard Rhino (i.e. non-grasshopper specific) EditPythonScript editor from within which one can hardcode module search paths that will also work in GHPython (in addition to the default ones that include the Standard Library path and some Rhino-specific modules).

On a side note: The GHPython component also comes hardcoded with references to the RhinoCommon and Grasshopper API’s (i.e. clr.AddReference to the two relevant assemblies). I’m still entirely new to Revit/Dynamo, but perhaps this might also make sense for commonly implemented Dynamo API’s such as ProtoGeometry and RevitNodes.

Hope that helps a bit. And thanks for listening. I hope to see much more Dynamo/Python action :metal:

2 Likes