Python

How To Run One Python Command To Turn Your Computer Into A Web Server

I don’t know if you have encountered such a situation, that is, sometimes you want to transfer some files from the computer to your mobile phone or pad. You either need to connect to the computer with a data cable, sometimes you need to install various drivers to carry out data transmission, or you need …

How To Run One Python Command To Turn Your Computer Into A Web Server Read More »

How To Define And Execute Customized Function In Python

Functions are well organized, reusable pieces of code that implement a single function. Function can improve the modularity of application and reuse of code. You already know that python provides many built-in functions, such as print(). But you can also create your own functions, which are called user-defined functions.

How To Use Python Sys Module Examples

Python sys module is a standard built-in module which contains variables and methods related to Python interpreter. This article will introduce the sys module contained variables and methods to you with examples about how to use them. Before use them, you should first import sys module with command import sys.

How To Use Python OS Module Walk Method Example

The os.walk(top, topdown=True, onerror=None, followlinks=False) method is a very important and powerful method in python standard os module. It can help us to traverse the directory tree in a top-down or bottom-up recursive manner very conveniently and return a tuple (dir-path, dir-names, file-names) for each directory. Below is the returned tuple’s elements description. dir-path : …

How To Use Python OS Module Walk Method Example Read More »

How To Run Shell Command And Get Output In Python

In early python version, the os modules’s system or popen function is usually used to execute operating system commands. However, recently python gradually abandon these functions officially. It recommend to use the built-in subprocess module to execute operating system-related commands. This article will tell you how to use subprocess module and os module’s system, popen …

How To Run Shell Command And Get Output In Python Read More »

How To Use Python OS Module Tutorial

Python os module is a module in the python standard library for accessing operating system related functions. The os module provide a portable method of using operating system functions. Use the interface provided in python os module, cross platform access can be achieved. However, not all interfaces in the os module are universal used on …

How To Use Python OS Module Tutorial Read More »

How To Use Jupyter Notebook Tutorial

Jupyter notebook is a web application program. It can be used to easily create and share program documents. It supports real-time code, mathematical equations, visualization and markdown. It’s purpose includes data cleaning and conversion, numerical simulation, statistical modeling, machine learning, etc. This article will tell you how to install and run it.