/  Technology   /  How to Code in Python using Spyder
HOW TO CODE IN PYTHON USING SPYDER 6(i2tutorials)

How to Code in Python using Spyder

What is Spyder?

Spyder is an open-source Integrated Development Environment. It is written in python used for python, designed by scientists and exclusively made for scientists, data analysts, and engineers. It is also known as Scientific Python Development IDE.

It provides Editor to write code, a console to evaluate it, and view the results at any time, a variable explorer to examine the variables defined during evaluation and many other features for effectively developing the programs or application.


Installation

The easiest way to install spyder is by downloading the Anaconda python distribution. Spyder comes as default implementation with Anaconda python distribution. This is the recommended method to install spyder. You can download Anaconda from its website


By clicking on the download, you can download the version compatible with your system.


Once after you complete the installation process you can launch the spyder from the Anaconda Navigator or you can directly search into your system.


When you will start the spyder the first thing that you are going to get will look something like this


Create a file

  • To create a new file go to File and click on New File
  • The first component that we will be going to take is an editor which is on the left-hand side.


Editor

This is the place where you are going to write your python code every time. Now for a test, we will write a simple code.

print(‘Happy Coding’)


And when you select it and hit shift + enter, it will execute the code in IPYTHON.


IPYTHON

Ipython is on the bottom right-hand side. Any code you write in the editor, the output will be displayed in the Ipython console.


As you can see the output of the above code is displayed here.


Variable Explorer

You can see this just above the Ipython console or you can go to views, click on panes and select variable explorer. It shows the namespace content, functions, etc. If we declare a variable p = 7 in our code then you can see in the variable explorer its name, type, size, and its value.


It is helpful when you have multiple variables declared in your program, this content helps in figuring out the variables.


File Explorer

File Explorer is next to the variable explorer or you can go to views click on panes and select file explorer. It is a pane that is built-in file system and directory for browsing, to view files.


Help

Help is next to the file explorer. You can use help pane to find, render, and to display documentation for any object, modules, functions, and methods.


History Log

The history log is next to the Ipython console. With the history log pane you can view a list of every command you entered in any connective Ipython console.


Tools

If you want to change the font size and use different functions of this IDE, you can go to tools > preferences and can change consoles, font size, shell sizes, and various other stuff.

Leave a comment