Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
553 views
in Technique[技术] by (71.8m points)

eclipse - How to integrate or embed a pyDev project into a Mule or a Java project

I recently created a pyDev project and ran the code. It works fine.

Unlike a java or a mule based project, I am unable to find an option to export the pyDev python project I already have in my Anypoint Studio workspace.

I could clearly see that the python interpreter files are already added to my python project. I wished if I could somehow add this to a Mule or Java based project, either as a library(exe, jar) in the build path, or add as a maven dependency(any possible way). The same way how we all used to add a java project into a mule project, or a mule project into a mule project using the above methods(or any).

In the below Image, I have two projects, one is encryption which is a mule based project, and the mule-python which is a pyDev python based project.

My aim is to use the latter in the former (i.e. To make an United Mule Project which runs python too).

I need some assistance from someone who already tried doing this in the past. Any advice from others who haven't tried is also grateful. Thanks in advance.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can not integrate a Mule project with a Python project in Eclipse because they are implemented by different Eclipse plugins and they are completely independant. That's the same reason that you can not integrate for example a C++ project with a Java project.

One alternative is that Mule has a Scripting Module that allows to execute Python scripts inside the Mule project using a Java Python implementation (jython). This has limitations (no support for native libraries, no support for pip) but it should be good to run simple scripts like the one in the screenshot.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...