Working on RhinoPython without running Rhino

So my idea is if I don’t need to access any Rhino or GH objects, but rather just use ironpython. How can I access it if I already have Python3 installed and set as default in the system variable path.

I assume I need to work in a virtual environment, but does Rhino have that already setup? If so can I just use it? How ca I access it from, let’s say VScode or WingIDE?

Thanks in advance.

Install an IronPython distribution from here:

http://ironpython.net/

And then set up your favourite IDE/editor such that it can build/run the ipy.exe (think that’s what’s it called). I’m pretty sure that Rhino doesn’t come with it’s own IronPython executable, but even if it did this seems like a good time to separate concerns.

Thanks, I’ll try that.
I read somewhere in the old GH forum that having separate ironpython installation may cause problems when running scripts from inside rhino.

Maybe that was already fixed.

I am under the impression that Rhino installs the version of IronPython that it’s designed to work with. I suppose it checks to see if it’s already there.

That’s correct, especially if one also had Revit/Dynamo installed. I believe this has been fixed on both ends. Or, at least there is a fix on the Rhino end.

It does, but I’m pretty sure it’s doesn’t expose an interpreter that can be used by e.g. Sublime Text, Visual Studio etc. I might be wrong about that though. However even if it does, I wouldn’t recommend making it a dependency for code one writes that is meant to be run outside/independent of Rhino. That seems like pretty bad coding practice.

@AndersDeleuran,

As I consider you Python Guru, can I ask you a question.

I’ve been playing around with WinForms and IronPython and I got an exception ‘Parameter is not valid’

image

At the end of the description there is:

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Do you know where can I find (or how and where should I create) this .config file, so I can debug my stuff?

Thanks in advance.