So I’ve been brushing up a little bit on my python, but doing so under the guise of julia projects that require/benefit from pycall so I don’t rust out any skills. Had me thinking, when do other people consider using PyCall in a project and how do they typically do so? Similarly, I’m also interested in cases where people find a good use for PyJulia. Although I am pretty doubtful there will be a lot of users here who have opinions on this, I figured I’d ask :).
Use cases I’ve found so far:
- Interfacing with hardware, like a computer microphone or speakers.
- When OOP “feels right”: Ie: I wrote a little python class for loading batches of training data. Yes, this can be done in Julia, but, some of the OOP paradigms in python are very clean and do not need best-in-class performance.
- When there is “advanced” functionality for doing essential tasks that we just don’t have in our ecosystem and I don’t have time to roll my own. An example of this could be needing GTK for a function/action. Yes, I am aware Julia has wrappers to GTK but my last attempt at using them was pretty painful and lead to me realizing I couldn’t use it for the task I needed too, trying to grok the code and realizing there were almost no docstrings/comments in the entire package and found doing what I needed via the python API to take ~30minutes.
It’s interesting to think about but, when does an application/project truly benefit from being mostly python vs sometimes calling out to Julia, or the opposite, when does an application/project benefit from being mostly Julia and sometimes calling out to python.
1 post - 1 participant