Yes, clr.CompileModules() will work.
Additionally, you can use that functionality to create .ghpy files (Python version of .gha files). The tutorial is here: Tutorial: creating a Grasshopper component with the Python GHPY compiler
Yes, clr.CompileModules() will work.
Additionally, you can use that functionality to create .ghpy files (Python version of .gha files). The tutorial is here: Tutorial: creating a Grasshopper component with the Python GHPY compiler