4

I have tried googling this, but it is a lot of programming talk i do not necessarily completely understand. All i have done so far is download the SDK for Leap Motion and found that programs can be written with python. which is a programming language i am somewhat familiar with.

From the samples on the SDK it seems it requires a module to start writing that means each leap motion app starts with "import Leap" in python. however i do not have this "Leap" module and I am not sure where to download it.

Pretty much I would like to be able to play around and create some basic apps that can do some simple things, but I am not so sure on how I would actually need to write the program for leap motion and then also how to turn it into an application that can be opened and controlled with the Leap Motion device.

Ray
  • 2,472
  • 18
  • 22
user2627127
  • 113
  • 2
  • 3
  • 10
  • The best way (IMHO) is trying to run existing script, than play with it: [1-try to understand, 2-modify, 3-run, 4-goto (1)], one of the scipt that you can play with it is "Sample.py" included in the SDK. – Adil Sep 18 '13 at 09:00
  • Here's a link that currently works https://developer-archive.leapmotion.com/documentation/python/index.html However, this is now considered a legacy API, see https://developer.leapmotion.com/documentation/ – PM 2Ring Jun 16 '18 at 05:23

2 Answers2

7

To begin, here's the Leap Motion Python documentation overview: https://developer.leapmotion.com/documentation/Languages/Python/Guides/Leap_Overview.html

You can find Leap.py within the LeapSDK/lib/ directory. Review the following link for information about the file structure of the Leap Motion SDK: https://developer.leapmotion.com/documentation/Languages/Python/Guides/Sample_Python_Tutorial.html

Finally, you can find the Leap Motion API documentation here: http://developer.leapmotion.com/documentation/Languages/Python/API/index.html

UPDATE: Leap Motion has changed their documentation location and structure since I originally wrote this reply. The above links no longer work.

As I also no longer develop on Leap Motion's platform, I'm unfamiliar with the various APIs they currently have setup, so I'll avoid making any assumptions and simply leave a link to the documentation's index:

https://developer.leapmotion.com/documentation/index.html?proglang=current

Nicksil
  • 91
  • 8
1

There are instructions in the docs for Running the Sample:

https://developer.leapmotion.com/documentation/python/devguide/Sample_Tutorial.html#id26

Which explains the dependencies.

ayman
  • 1,341
  • 12
  • 22