How To Run Python With Eclipse (day 2, optional)

Before proceeding with the rest Python tutorials I would like to show you how to take advantage of a better development environment. I want to show you how to run Python in Eclipse using a plugin called PyDev.

PyDev is a Python interface for eclipse that makes it easy for you to work with Django, Google App Engine or a plain Python project.

Previous Episodes

  1. Hello World!

Requirements

  • Eclipse
  • Python

Day 2: How To Run Python In Eclipse

Start a New Python Project

To start a new Python project simply go to File->Project. Select the PyDev folder and the option "PyDev Project" click next.

Configure The Python Interpreter

In order to run Python in Eclipse you will have to configure the Python interpreter first. This means that you need to tell eclipse where your python.exe file is located so that it can run the python code through there.

First click New and name and browse for that file.

Now click apply and Ok.

How To Run a Python Program

Start off with this line of code.

print("hello world")

and click the white arrow with green background in the menu. You will be given the option to select how you want to run python, choose */ // ]]>

blog comments powered by Disqus