How to create a basic python program in Eclipse using Pydev

In this article, I will be demonstrating how you can create a basic Python program using eclipse in Pydev. If you want to see how to setup Pydev with Eclipse, refer to this article.

Creating a Python Project

Step 1 – Click on File –> New –> Pydev project

The following screen is shown:

Step 2 – Enter a project name and click on Next:

Step 3 – The following screen is shown. Click on finish:

This creates the project as follows:

 

Creating a new Python Module

After creating a new Python project, the next step is to create a new Python module.

Step 1 – Right click on the project, click on New –> Pydev module:

The following screen will be shown:

Step 2 – Enter a name for the module. Leave the package field blank. Click on “Finish”:

Step 3 – This displays the following screen. Click on “OK”

This shows the python module in the project as follows:

 

Writing some basic Python code

The next step is to write Python code.

Step 1 – Type the code shown below:

 

The first statement prints the text “Hello World”. The second statement prints the result of adding the values assigned to ‘a’ and ‘b’. So this code prints the following output:

Hello World15

 

Further Learning

The Python Masterclass
Everything you need to know about Python
Python for beginners
Python for finance

 

Comments

Popular posts from this blog

How to use logging in SpringBoot with code samples

Python While Loop with code samples

How to convert a List to a Set