Python

Python3 Peewee use

When using, first define the Model according to the requirements, and then create a table through create_tables(). If the database table has been created, you can directly create the Model through the python -m pwiz script tool

Python Selenium wait for page load to complete

Why set elements to wait? When your network is slow, it is slow to open the webpage, the webpage is not fully opened, the code is already executing, but the element you locate is not found, and python will report an error at this time

Python Loguru logging solution

For the logging module, even if it is simple to use, you need to define the format yourself. Here is a more elegant, efficient and concise third-party module: loguru

Python direct assignment, shallow copy and deep copy analysis

Direct assignment: In fact, it is a reference to the object. Shallow copy (copy): copies the parent object and does not copy the internal child objects of the object. Deep copy (deepcopy): The deepcopy method of the copy module completely copies the parent object and its child objects.