Using Python API with Xcode

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

Using Python API with Xcode

Post by graboosky » Wed Feb 12, 2020 9:34 am

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: 250
Joined: Fri Jul 06, 2018 11:13 am

Re: Using Python API with Xcode

Post by kimberly » Thu Feb 13, 2020 2:29 pm

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: 15
Joined: Mon Jan 27, 2020 8:11 am

Re: Using Python API with Xcode

Post by graboosky » Thu Feb 13, 2020 5:19 pm

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: 250
Joined: Fri Jul 06, 2018 11:13 am

Re: Using Python API with Xcode

Post by kimberly » Fri Feb 14, 2020 9:29 am

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: 15
Joined: Mon Jan 27, 2020 8:11 am

Re: Using Python API with Xcode

Post by graboosky » Sat Feb 15, 2020 11:41 am

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: 250
Joined: Fri Jul 06, 2018 11:13 am

Re: Using Python API with Xcode

Post by kimberly » Mon Feb 17, 2020 3:22 pm

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: 15
Joined: Mon Jan 27, 2020 8:11 am

Re: Using Python API with Xcode

Post by graboosky » Mon Mar 16, 2020 3:12 pm

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

Post Reply