Python 3.x soon?

Hi there,
Is there any plans to have compatibility between Ignition (latest version) and Python 3.x?
Thanks
Erik

2 Likes

No, not soon.

If a stable Jython 3 release ever happens we’ll evaluate whether or not we can even upgrade while preserving backwards compatibility, but it’s not something we’re prioritizing or has a timeline.

2 Likes

Thanks @Kevin.Herron
What’s the best way to interface our Ignition project with an external script running Python 3.7 for example?

depends upon what you want to achieve? How tightly is the external script coupled with Ignition tag database or sql database.

Similar request here:

Keep in mind that Jython3.x still won’t support any dependencies that use C DLL interfaces, so you could find yourself disappointed anyways.

Thanks @Pramanj, I would like to run 2 applications independently (1 is Ignition, and the other is a Python Script), both could access the same DB.
How would you hand-shake data/signals between these 2 apps (e.g a calculation from the Python script to use in the Ignition project and vice versa)?

Is you’re python 3 stuff just running scripts on a database, that’s all?

Personally I’d probably make a flask server to host your python 3 stuff on, and then you can use the system.net.HTTPVerb functions https://docs.inductiveautomation.com/display/DOC80/system.net to talk to your flask server to tell it to do something, or to get data from it.

To go the opposite way, to have your flask server tell Ignition to do stuff, I believe you would need the Web Module to create an API on Ignition for flask to send get/post requests to, but I don’t have too much experience with that.

2 Likes

You could set up an inter process communication like a socket connection between your external python 3+ application and the existing jython 2+ scripts in Ignition and communicate between the two thru a handshake. It may also be possible for your external application to access the same SQL data base for historical data as Ignition.

1 Like

However , beware the socket on Ignition should be a java socket rather than a jython socket as java sockets are more efficient and reliable than jython sockets. (We have a module for the Java scoket using jython in Ignition!).

That’s also a possible approach if the external python 3 application is a web application. If its just a standalone application, then I think a simple socket approach is good enough in my opinion.

Makes sense. I used to be a web developer so my my go to is API, and setting one up wtih flask is quick and easy so that was my first thought. I’m sure there’s many ways to tackle this situation.

1 Like