Skip to content

Blog

[PyQt5] Use icon from QStyle

PyQt5

Introduction

When we using PyQt5 framework to develop a GUI program, we usually need some icon to display our buttons or components. Many times we can load pictures from outside, but if we need common icons, such as play icon, close icon, minimum icon ... etc, we can use the built-in icon picture from QStyle module.

This has another advantage: we don't have to worry about pictures when packing the GUI program.

Below I will introduce how to use the icons in QStyle.

Read More »[PyQt5] Use icon from QStyle

How to use Pickle module to store data in Python

Python is the most popular programming language!

Introduction

Hello! Today I want to record the "pickle" module in Python. The "pickle" module is very famous module in Python, its usage is like another Python package "Json", it can compress the data and store it. If we want to load the data we store, we can easily call the "load()" function to restore our session.

Read More »How to use Pickle module to store data in Python

Using Python package "ujson" to increase Json processing speed

Python is the most popular programming language!

Introduction

Whatever programming language we used, we always selected Json format to store our data.

Json (JavaScript Object Notation) is a lightweight data-interchange format, and it is readable and suitable for storing data. But in Python, sometimes we have performance bottlenecks in reading Json files, especially when the files are too large.

Read More »Using Python package "ujson" to increase Json processing speed

Fibonacci standard answer


Introduction

The birth of this article was accidental.

That's what happened:

  • Today I want to speed up pure Python program
  • I found that I can do it with CPython
  • I need a test case to test CPython program
  • I thought of Fibonacci
  • I need answers to check program is correct
Read More »Fibonacci standard answer

[Solved][Python] ModuleNotFoundError: No module named 'cStringIO'

python
Display Python code on the screen

Introduction

This is a record of the error message that I have encountered: When learning a sample code provided on the Internet, it was no problem for them to use the code to cut the picture and save it in the clipboard, but when I used their sample, it show the following error message:

ModuleNotFoundError: No module named 'cStringIO'

It looks like I lacked the cStringIO module, and finally I found the answer on StackOverflow.

Read More »[Solved][Python] ModuleNotFoundError: No module named 'cStringIO'