ghpython icon indicating copy to clipboard operation
ghpython copied to clipboard

Exterior editor possible?

Open xarthurx opened this issue 12 years ago • 5 comments

I was wondering if it is possible to write codes in an exterior editor like vim or emacs? The original editor is quite not friendly to use.

xarthurx avatar Jul 04 '12 12:07 xarthurx

My main suggestion at present would be to write the code in a file, and run it with the RunPythonScript command. Make sure not to use any user-interface related commands, such as GetObject() or TurnOnGrips, as they are not usable within a pure-functional environment such as Grasshopper. When the code is done and testes, I'd suggest to move it to the component. There are alternatives, such as importing external modules, etc. Changing the editor altogether appears to be a titanic effort (all the interop, etc) but it would actually be possible, just very low in the list of priorities. SharpDevelop is already the suggested way to edit Windows Forms: http://python.rhino3d.com/threads/483-Sharpdevelop-for-Windows-Forms

piac avatar Jul 04 '12 13:07 piac

@maniux : how would you envision this to happen? Should it just be possible to create .Net .dlls and load them in Grasshopper?

piac avatar Oct 23 '13 10:10 piac

@piac Yes, probably.

xarthurx avatar Oct 26 '13 15:10 xarthurx

@maniux Which IDE are you using the most? (We all have preferences and I'd have to start somewhere looking how they provide external editing).

Also, I do not think that a simple text editor will help, and I did not write the editor that is currently used in ghPython. However, I might be able to help a bit in some specific areas if you could help me highlighting key problematic features.

Thanks for both things!

piac avatar Oct 28 '13 10:10 piac

@piac I used to use Emacs. But I'm now reading my Master degree so that I do not write python code very often. I think it'll be much better if you could propose a vote on rhino python forum.

xarthurx avatar Nov 04 '13 04:11 xarthurx