Get python code from grasshopper node as plain text

Have a look at the code I posted here, it demonstrates how to get the code of GHPython components and export this to .py files/make user objects: