Python code runs through cmd however not in IDLE..Why?
Question: Okay so i just got my leap motion device and im trying to run the scripts.
When I press f5, the scripts load however it doesnt do the functions.. (it
initilizes, loads everything) .

But when i open by double clicking (through cmd) it works how its supposed to
properly..

Any idea why?

Here is an example code:

<http://pastebin.com/6Pu2DQ4n>


Answer: IDLE isn't executing the code in the `if __name__ == '__main__'` due to the
way it is expected to work.

Change the last two lines so that the `if` statement isn't there, and the
`main()` call is not indented:

    
    
    # if __name__ == "__main__":
    main()
    

Note, this _will_ mean that `main()` is executed _every_ time this function is
imported anywhere, but it should run in IDLE. (IDLE didn't run `main`
previously as it doesn't trigger the `if`)

PS Well done on getting hold of a LEAP! V. jealous >:)

