Call Python code from an existing project written in Swift

前端 未结 4 977
忘了有多久
忘了有多久 2020-11-27 17:26

I need a way to call Python code from Swift on an Apple platform. A library would be ideal. I\'ve done a considerable amount of Google searching, and the closest material I

4条回答
  •  遥遥无期
    2020-11-27 18:05

    I found this excellent and up to date gist that walks you through a complete solution: https://github.com/ndevenish/Site-ndevenish/blob/master/_posts/2017-04-11-using-python-with-swift-3.markdown

    If you can get away with just using NSTask to launch a Python process, that's a pretty good option too.

提交回复
热议问题