create web socket and save data in a text file

Today, we will create a websocket in linux and save the data received in a text file.webrtc implementation asterisk : Webphone To create a WebSocket server in Linux that listens for incoming WebSocket connections and saves the received data to a text file, you can use Python with the websockets library. Below is a step-by-step … Read more

python installation on windows

python tutorial

python installation on windows Since windows don’t come with Python preinstalled, it needs to be installed explicitly. Here we will define step by step tutorial on How to install Python on Windows. Follow the steps below : Download Python Latest Version from python.org First and foremost step is to open a browser and open https://www.python.org/downloads/windows/ Here, … Read more

Introduction to python

python tutorial

Introduction to python What is Python? Python is a popular programming language. It was created by Guido van Rossum, and released in 1991. It is used for: web development (server-side), software development, mathematics, system scripting. What can Python do? Python can be used on a server to create web applications. Python can be used alongside … Read more

Install Python 3.8 on CentOS 7 / CentOS 8

python tutorial

Install Python 3.8 on CentOS 7 / CentOS 8 Step 1: Install Python Dependencies As we’ll install Python from source, let’s install the packages required for Python installation. sudo yum -y groupinstall “Development Tools” sudo yum -y install openssl-devel bzip2-devel libffi-devel Confirm gcc is available: $ gcc –version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39) … Read more

How to Install Python 3.8 on Amazon Linux

python tutorial

How to Install Python 3.8 on Amazon Linux Python is a powerful programming language. It is very friendly and easy to learn. During the latest update of this article Python 3.8.0 (of Python 3.8 series) latest stable version is available to download and install. This tutorial will help you to install Python 3.8 on Amazon … Read more

Python Function

python tutorial

What are functions? Functions are a convenient way to divide your code into useful blocks, allowing us to order our code, make it more readable, reuse it and save some time. Functions are a key way to define interfaces so programmers can share their code. Function is a block of organized, reusable code that is … Read more

Python Comment : Comment in Python

python tutorial

As programs get bigger and more complicated, they get more difficult to read. Formal languages are dense, and it is often difficult to look at a piece of code and figure out what it is doing, or why. For this reason, it is a good idea to add notes to your programs to explain in … Read more

python : If else example

python tutorial

Decision making is anticipation of conditions occurring while execution of the program and specifying actions taken according to the conditions. Decision structures evaluate multiple expressions which produce TRUE or FALSE as outcome. You need to determine which action to take and which statements to execute if outcome is TRUE or FALSE otherwise. Lets have an … Read more

Python Identity Operators Example

identity operator python

There are used to compare the memory locations of two operators. Example: #!/usr/bin/python a = 20 b = 20 if ( a is b ): print “Line 1 – a and b have same identity” else: print “Line 1 – a and b do not have same identity” if ( id(a) == id(b) ): print … Read more