You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to support IronPython 2.7 and 3.4 in one app? #1798
We have a large desktop application that uses v2.7. It's a scientific data processing app that allows users to write their own .py scripts (as well as many "system" scripts) which the app can execute and interact with, and is in use at many customer sites.
We'd like to start using v3.4 but it's vital that the app can still run all those v2.7 scripts that are out there at customer sites. I'll therefore need to reference both versions of IronPython, and (somehow) use either the 2.7 or 3.4 script engine etc, depending on which version of the script it is.
The main issue I see is that the assembly DLLs have the same name in both versions (and I'm guessing the types will also have the same names), so does anyone have a suggestion as to how I can reference/use both versions of IronPython in the same app? Releasing a new version of our app that only support v3.4, and leaving existing customers on the older version with 2.7 isn't an option.
I store the IronPython specific assemblies in separate (IronPython2/IronPython3) folders. I have an assembly resolver which is used to load the appropriate assemblies from their respective folders. Then, using a common DLR I create engines for each. Something like this:
Activity
slozier commentedon May 3, 2024
I store the IronPython specific assemblies in separate (IronPython2/IronPython3) folders. I have an assembly resolver which is used to load the appropriate assemblies from their respective folders. Then, using a common DLR I create engines for each. Something like this: