INTRODUCTION
Python
- It is interactive, interpreted and object-oriented programming.
- It contains modules, classes, exceptions.
- Supports dynamic data types and dynamic data binding.
- Supports imperative, functional and procedural type of programming.
SOFTWARES & TOOLS
- Eclipse (Mars2)
- Python
GOAL
- Instal Python
- Install Python Plugin in Eclipse
- Create & Run a Python Program
INSTALL PYTHON
- Download latest python software package from official Python website: https://www.python.org/ as per your system configuration (Windows/Linux)
- It is advisable to install it under c: directly.
INSTALL ECLIPSE PLUG-IN
- In Eclipse, go to Help -> Install New Software
- Name: Python
- Location: http://pydev.org/updates
- Click Next & Finish
- Go to Window->PyDev->Interpreters->Python Interpreter
- Click New Button at top right
- Interpreter Name: Python
- Interpreter Executable: C:\Python27\python.exe
- Click OK
CREATE & RUN A PYTHON PROGRAM
- Create a New PyDev->PyDev Project & Enter Name for the Project.
- Select Interpreter (Python) which we created earlier
- Click Finish.
- Select Python Perspective by Window->Open Perspective->PyDev
- Select the newly created project and create an src folder (if not found) by PyDev->&Source Folder
- Now create a new Python program file by PyDev->PyDev &Module
- Enter name (helloworld) and select Template as <Empty> just for now and click OK
- Now your first program is ready to code.
- Enter below code in helloworld.py and save
print "Hello World in Python!!"
- Now Right click, Run As->Python Run
OUTPUT
Hello World in Python!!
|
No comments :
Post a Comment