Compiling Python Programs
1. Download the Python Source for your OS.
2. Click here to download Python if it is not installed on your computer.
3. Use IDLE to run python:
Open up IDLE (Python GUI), which should be installed on your computer after installing python. Click File and then Open. Find the python file you want to run, and open it. Once opened, select Run and click Run Module from the drop down menu.
3. (Alternate) Use Terminal/Command Line to run python:
- Windows: Navigate to where the python file is stored, and type your program's name with the extension (.py).
- Mac: Navigate to where the python file is stored, and type python followed by your program's name (including .py).
- Linux: Navigate to where the python file is stored, and type python followed by your program's name (including .py).
3. (Another alternate) Use interactive mode to send commands to the Finch.
Open Terminal/Command Prompt, navigate to the location of pyfinch.py, and type python. Something like
Python 3.3.0 (v3.3.0, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
should pop up. If "'python' is not recognized as an internal or external command, operable program or batch file." appears, then follow the directions here to correct the PATH.
Now type the following commands:
from finch import Finch
finch = Finch()
Now to access any function in the API, simply type finch.functionName()
LINUX USERS ONLY:
- You will need to install libusb-1.0. To do so, run sudo apt-get install libusb-1.0-0-dev in any terminal window.
- Download this script and run it prior to running the Finch for the first time. Make it executable by typing chmod +x Configure and then run sudo ./Configure in the top level directory of the download.