Using Python API with Xcode

Firmware/software/electronics
Post Reply
graboosky
Beginner
Posts: 16
Joined: Mon Jan 27, 2020 8:11 am

Using Python API with Xcode

Post by graboosky »

Hi, I want to give a try myself and write OS X native app (maybe because I am not Python guy xD) Do you have any experience using Python API with Xcode? I was able to execute one of Crazyflie example but I can just see in the console “connecting to” status. Same script works when executed from terminal (“connecting to” change almost immediately to “connected”)

Any thoughts? Maybe I need to let Xcode knows that example script has access to USB?

I try to use PythonKit by tensorflow.

kimberly
Bitcraze
Posts: 475
Joined: Fri Jul 06, 2018 11:13 am

Re: Using Python API with Xcode

Post by kimberly »

Hi! this is a bit difficult for us to answer. Could you clarify more clearly what you want to do? This might not be Xcode related.

Have you tried looking at our IOS client for inspiration ? (https://github.com/bitcraze/crazyflie2-ios-client)

graboosky
Beginner
Posts: 16
Joined: Mon Jan 27, 2020 8:11 am

Re: Using Python API with Xcode

Post by graboosky »

Hi, yes, I saw that.

The thing is I want to write soft to manage swarm. Bluetooth LE is too slow:/

So I was thinking about Crazyrradio and osx so could osx reach USB.

Script executed from Xcode always stops on:

Code: Select all

Connecting to radio://0/80/2M
Same script works perfectly fine in the terminal.

kimberly
Bitcraze
Posts: 475
Joined: Fri Jul 06, 2018 11:13 am

Re: Using Python API with Xcode

Post by kimberly »

This is not something that we can help with unfortunately since this is bit far out of our scoop and we are not working with this library. But I hope that somebody in the forum community has experience with that can help you with this.

graboosky
Beginner
Posts: 16
Joined: Mon Jan 27, 2020 8:11 am

Re: Using Python API with Xcode

Post by graboosky »

Thanks for the reply.
Just to let you know, I have done the basic setup and it seems to work. PythonKit in Xcode tried to use system python instead of > 3.0.

Now I hope I will not have to learn Python itself xD

kimberly
Bitcraze
Posts: 475
Joined: Fri Jul 06, 2018 11:13 am

Re: Using Python API with Xcode

Post by kimberly »

Ah really, thanks for letting us know! Is that still python 2? That will lose support soon though of what we have heard so surprised that Xcode wouldn't work on python 3 already.

Good luck!

graboosky
Beginner
Posts: 16
Joined: Mon Jan 27, 2020 8:11 am

Re: Using Python API with Xcode

Post by graboosky »

It (Xcode) uses Python 3.0, otherwise it doesn’t work.

Post Reply