Skip to content

October 2020

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

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'

[Solved][PyQt5] DirectShowPlayerService::doRender: Unresolved error code 0x8040266 (IDisspatch error #102)

Last Updated on 2020-10-14 by Clay

PyQt5

Introduction

Today when I using PyQt5 framework to build a video player service, I got an error message at QMediaPlayer:

DirectShowPlayerService::doRender: Unresolved error code 0x8040266 (IDisspatch error #102)
Read More »[Solved][PyQt5] DirectShowPlayerService::doRender: Unresolved error code 0x8040266 (IDisspatch error #102)

[Python] Displaying Progress Bars Using the tqdm Package and Attempting to Implement Your Own Progress Bar

Last Updated on 2024-07-27 by Clay

When we write Python code, sometimes we want to visualize the 'progress bar' to help us understand where our program is currently executing. For this need, instead of writing the progress bar ourselves, we can consider using a well-known progress bar module in Python—tqdm.

Read More »[Python] Displaying Progress Bars Using the tqdm Package and Attempting to Implement Your Own Progress Bar

Using "json" module to write and load Json file in Python

Last Updated on 2020-10-07 by Clay

python
Display Python code on the screen

Introduction

Json format file is very easily to process, and many programming language support it. So this data format is quite suitable for joint access to a data and development between different programming languages.

Today I want to introduce how to use the Python package "json" to write and load a Json format file.

Read More »Using "json" module to write and load Json file in Python

Display the computer's OS and CPU core in Python

Last Updated on 2020-10-05 by Clay

python
Display Python code on the screen

Introduction

When we developing a Python project, sometimes we need to check which OS is user's current operating system, because of different operating systems we may have to use different methods to implement the same function.

In my recent project, I also need to know how many CPU cores the user has to implement a multi-threaded program, so, by the way, it is recorded here.

simply put, the platform module can be used to test the user operating system, and the cpu_count() function in multiprocessing module can be used to calculate the number of CPU cores.

Read More »Display the computer's OS and CPU core in Python