Python Tutorial

How To Use Python Openpyxl To Copy Excel Sheet Data In Same And Different Excel File

In this article, I will tell you how to use the python openpyxl library to copy one excel sheet data to another excel sheet, the two excel sheets can be in the same excel file or different excel file. If you do not know the openpyxl library, you can read the article How To Create

How To Use Python Openpyxl To Copy Excel Sheet Data In Same And Different Excel File Read More »

How To Fix Failed To Unlink Socket File Error When Start Mongo DB On MacOS

When i start mongo db on macOS console by run command mongod, i got below error message. {“t”:{“$date”:”2020-09-09T10:45:30.049+08:00″},”s”:”E”,  “c”:”NETWORK”,  “id”:23024,   “ctx”:”initandlisten”,”msg”:”Failed to unlink socket file”,”attr”:{“path”:”/tmp/mongodb-27017.sock”,”error”:”Permission denied”}}

How To Fix Failed To Unlink Socket File Error When Start Mongo DB On MacOS Read More »

How To Print Text From Standard Output (Stdout) To File In Python

When you run print(‘ hello python ‘) in python code, it always print the text on screen, this is because python standard output is screen console. But we always want to print the text to a file instead of screen console, especially print exception error messages when exception occurred in python source code.

How To Print Text From Standard Output (Stdout) To File In Python Read More »

What Is Decorator In Python With Example

Decorators can add new functions or restrictions to the decorated objects without modifying the original source code. There are many kinds of decorators, including function decorators and class decorators. The name of decorator is different in many programming languages. It embodies the decoration pattern in the design pattern and emphasizes the open and closed principle.

What Is Decorator In Python With Example Read More »