This chapter will walk you through the basics of Eclipse IDE and configuring it to develop Python scripts for Android.
Eclipse is an application with many capabilities and options. A welcome screen will greet you, the first time you launch the program. Eclipse uses a number of basic concepts and terminology to address different functions and operations of the program.
Some of these terminologies are explained here −
Workbench − It identifies the overall window of the Eclipse application. It contains multiple child windows, each window containing multiple tabs.
Workspace − It refers to the location on your system’s file system where projects created using Eclipse will be saved.
Perspective − It is a personal preference for which menus and windows are open at any one time. Eclipse has a number of perspectives configured for typical usage, such as writing code, debugging etc. You can also switch to a different perspective when your activity changes. Perspectives are also customizable.
One needs to configure Eclipse to be able to develop SL4A applications. Once the prerequisites are installed successfully on the host, the following plugins for Eclipse must be added −
ADT plugin for Eclipse (available at http://dl-ssl.google.com/android/eclipse/ )
Python Plugin for Eclipse (available at http://pydev.org/updates )
The following steps can be used to install plugins on Eclipse −
Step 1 − Click Help.
Step 2 − Select Install New Software.
Step 3 − Click Add.
Step 4 − Specify the name and the URL to access the plugin. Click OK.
Step 5 − Select all the tools and click Next. The plugin installation starts
Follow the given steps to configure Python Interpreter in Eclipse.
Step 1 − Select Windows → Preferences.
Step 2 − Go to PyDev → Interpreter → Python.
Step 3 − Click the New button.
Step 4 − Specify a name for the interpreter. In the Location field, enter the path to python.exe. For example, C:\Python26\python.exe
Step 5 − Click OK.