0

There is a bit of Matlab code id like to automate with an existing Python Project (through their supplied API which only runs on python v3.4 for my particular Matlab version). The Project im trying to build it into uses python 3.6.

Is there a way in which a Python 3.6 process can call a Python 3.4 process and intercommunicate with it in a relatively non hacky way?

Vlad
  • 1
  • 3
  • 2
    The way most programs intercommunicate, which is often a socket or pipe…? Your 3.4 program could simply use `stdin` and `stdout`, and the calling program hooks up to those when invoking the program. – deceze May 13 '20 at 16:11
  • Well as far as im concerned they can run as the same process, but the api doesn't allow a higher than python 3.4 process to start it. And i suppose i could edit the source code somehow to allow the thing to run on a higher version, but it seems like too much work for now if there might be an alternative. – Vlad May 13 '20 at 16:13
  • Oh, is it actively checking for a higher version, and blocking it? I would have expected it to require 3.4 or higher, rather than exactly 3.4. But maybe they don't want to support something they haven't tested. But if you really need different Python versions, then I don't think they can run in the same process. – Tom Karzes May 13 '20 at 16:15

1 Answers1

-1

If you don't need Python 3.6, you can just downgrade your version to match the 3.4 needed by Matlab. Other parts of the Python project might be affected though too, but this depends on how big the existing project is and what it's doing.

Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328