Skip to content

[PyQt5] Use icon from QStyle

[PyQt5] Use icon from QStyle

Last Updated on 2020-11-22 by Clay


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

Last Updated on 2020-11-18 by Clay

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

[Python] How to use filter() function

Last Updated on 2020-11-12 by Clay

Python is the most popular programming language!

Introduction

Today when I was answering a question asked by a friend, I see a filter() function in my friend’s code, and my friend just asked me what was wrong with this paragraph.

This is a awkward question. I have been learning Python for two years, but I never used this function in my program.

Read More »[Python] How to use filter() function

Using Python package “ujson” to increase Json processing speed

Last Updated on 2020-11-10 by Clay

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

Use Python PyInstaller to make an executable file with picture

Last Updated on 2020-11-04 by Clay

Display Python code on the screen

Introduction

When we used PyInstaller to create a Python program as an executable file, we usually need to display a picture in our program.

But if we used PyInstaller to make an executable file directly, we found we can’t show the picture. How does we solve this problem?

Read More »Use Python PyInstaller to make an executable file with picture

Fibonacci standard answer

Last Updated on 2020-10-24 by Clay


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’

Last Updated on 2020-10-20 by Clay

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’
Exit mobile version