Eclipse is a commonly-used Integrated Development Environment (IDE) for program development.
On many systems there is an icon for you to double-click to start up
Eclipse. If you’re using Linux and without an Eclipse icon,
enter this at a command-line prompt (the “ unix-%
” is the operating system prompt, you don’t need to type
that, and the "
&
" tells unix to run the process in the background, letting you
continue to use the command prompt):
unix-%
eclipse &
Either way, you’ll be prompted to specify a workspace directory;
specify yours as /home/yourLoginId/workspace
(Choose another, appropriate directory on Windows or Mac.).
You’ll have to start Eclipse this way every time you sit down to
program. There’s a checkbox you can check so that Eclipse does
not
continually ask you for your workspace directory; if you didn’t
check it this time, you can check it the next time you start Eclipse.
Warning: Eclipse is very particular about its workspaces. Never move or remove projects from a workspace folder unless you use Eclipse itself to do this. Many students try to move a workspace to a new location without Eclipse’s help; really bad things will happen if you do this.
The first time you start the Eclipse Platform it will show you a welcome screen. Go ahead and click the "X" next to the word "Welcome" to go to the default view. You should then see a screen similar to this:
The windows that comprise this view are together known as a "Perspective". The default perspective is one suitable for Java development, but we are interested in doing Python development. To get appropriate windows for our purposes:
Eclipse uses projects to keep different software projects separate. For your purposes, think of everything you do for this course as being part of one project.
Creating a project
cs108
for the Project namepython3.5
as the Interpreter Name
/usr/bin/python3.5
C:\python36\python.exe
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3
python3.5
as the Interpreter.
Follow these directions to create your cs108 project. You will add all your class materials to this project.
You should now see “cs108” in the Package Explorer on the
left side of the Eclipse. Expand the project by clicking on the
triangle to the left of its folder icon. You’ll see an
indication that this is a python3.5 project and a src
folder.
You can create additional packages, directories and files in your project for various purposes. For example, each new lab and homework assignment asks you to create a new folder to store its files. You can do this as follows:
Creating a folder in a project
src
folder.
Text files can be created in a similar manner (e.g. right-click on the
lab01
folder, select New→File).Text
files should have a .txt
extension and Python files
should have a .py
extension.
If you want to use your standard operating system to find the raw
files that Eclipse creates and maintains, you can find them under the
directory path similar to: eclipseWorkspacePath/cs108/src/.
Knowing this path is useful when you need to submit your work.
If you are in the midst of lab01, you should now return to those instructions.