Oct-13-2017, 01:44 PM
(Oct-13-2017, 01:14 AM)poijuggler Wrote: What will happen if two different versions of python are embedded and initialized within the same process?
Not sure what you mean by this. If you have two (or more) versions of Python, they each have their own respective 'home' directories. If you import a module, Python will search the directory of the version that called it, if it is not there, you will get an error, regardless if the module exists in the other versions directory.
If you mean can you import, let's say a module written in Python 3 into a script written in Python 2, I don't see why not, provided the Python 2 executable knows where to find it (for instance, both scripts are in the same directory). Of course it may not work entirely as you expect. You could also use 'subprocess' to run your Python 3 script then return to the Python 2 script.
(Oct-13-2017, 01:14 AM)poijuggler Wrote: the initialization of python will be managed globally and each app will obtain a sub-interpreter.
Again, it's unclear as to what you mean by 'sub-interpreter'.
DISCLAIMER: This is just me thinking out loud here as I've not tried to mix and match versions. Just seems like to much work for to little gain.
As to restructuring the company, that shouldn't be necessary, but they should know that Python 2 is a dead horse, so stop beating it. :-)
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition