Setting up communication between two PyCharm projects
Due to my inexperience with PyCharm (or Python in general), this question might be trivial, however - is it possible to set up PyCharm workflow such that an output from Project A drives some actions in Project B?
More detailed explanation of what I am trying to achieve is:
- PROJECT A (with Python 2.7 interpreter) will be used to output .tiff files with some frequency; it should also pass these files to Project B in real-time
- PROJECT B (with Python 3.6) will analyse each frame in real-time as they are being received
The reason behind using two different interpreters/projects is that both Project A and Project B are open-source software written by a third party. I am looking for the most efficient way to connect two of them (using PyCharm).
Please sign in to leave a comment.
Yes, but IDE is not taking part in this. I assume in Project B you have a code that starts a server that in turn watches for changes in the specific directory, and as soon as it finds a new .tiff file there, loads and process it. In this case just run the server in Project B, switch to project A and run the code that outputs .tiff files.
If you want some IDE-specific conditions, like "If new .tiff file appears in specified path, then run python configuration" - there's no such feature. And I don't see it being useful in production as the deployed app should function without IDE.
Dear Andrey,
first of all - thanks for replying! Project B is actually a python-based open-source library for image analysis. Its main script accepts .tiff file(s), however, this step (i.e loading files) has to be done manually. I would like to automate it in a way that Project 1 (which manages image acquisition by controlling external hardware) uses the main script from Project B and passes continuously acquired images for analysis.
Somehow I hoped IDE would have a solution for that kind of workflow, since in the case of a single project I can call/import files in other scripts, but with two different projects (and two different interpreters) I am struggling with how to establish this kind of communication.
Best, Tea