Category:Python

  • Tkinter (15) radio button unit

    Time:2021-4-23

    Creation of radio button part and its options Each part consists of two parts, indicator and label. Several such parts form a group and are set to the same control variable (intvar or stringvar) import tkinter as tk parent = tk.Tk() radio_button = tk.Radiobutton(parent, option, …) option explain activebackground Background color when active activeforeground Foreground […]

  • Explain Python Google protocol buffer in detail

    Time:2021-4-23

    This article mainly introduces how to use Google protocol buffer in Python language (later abbreviated as Pb), including the following parts: Why use PB? Install Google PB Custom. Proto file Compile. Proto file Parsing the target py file serialization and deserialization More complex message Dynamic compilation Why use PB? Pb (protocol buffer) is a structured […]

  • Python Pillow.Image Image saving and parameter selection

    Time:2021-4-23

    The code is as follows: figure_corp = figure.crop( (32*rate/2, 32*rate/2, 32-32*rate/2, 32-32*rate/2)) figure.save(‘save_picture/picture.jpg’,quality=95,subsampling=0) figure_corp.save(‘save_picture/picture_crop.jpg’,quality=95,subsampling=0) The quality value will affect the image quality (1 is the worst, 95 is the best) Subsampling parameter: subsampling, the practice of encoding image by realizing the resolution of chroma information lower than brightness information. The possible subsampling values are 0, […]

  • Tkinter (16) pull rod

    Time:2021-4-22

    Creation and options of pull rod parts The slider, slider slot, tick, title label and slider value are included in the pull rod import tkinter as tk parent = tk.Tk() scale = tk.Scale(parent, option, …) option explain activebackground Background color when active bg or background The background color is 0 for dot matrix bd or […]

  • Python rookie tutorial 12: input and output

    Time:2021-4-22

    Python has two ways to output values: Expression statement Print() function File object write () method, standard output file can be used sys.stdout quote. If you want the output to be more diverse, you can use str.format () function to format the output value. If you want to convert the output value to a string, […]

  • How to use insert function in Python

    Time:2021-4-22

    This article mainly introduces how to use the insert function in Python. Through the example code, it is very detailed, which has a certain reference learning value for everyone’s study or work. If you need a friend, you can refer to it describe The insert() function is used to insert the specified object into the […]

  • Tkinter (17) scroll bar

    Time:2021-4-21

    Creation of scroll bar and its options The scroll bar consists of slider, arrow1, arrow2 and trough. The size and position of the slider represent the proportion and position of the visible part in the whole content (0.0 ~ 1.0) import tkinter as tk root = tk.Tk() parent_widget = … scroll_bar = tk.Scrollbar(parent_widget, option, …) […]

  • Python data analysis: EDA analysis of American police shooting cases

    Time:2021-4-21

    The text and pictures of this article are from the Internet, only for learning and communication, and do not have any commercial use. If you have any questions, please contact us in time. The following article is from Python practical dictionary, written by kender   preface In 2014, a policeman named Ferguson killed Michael in […]

  • Flash upload image and zoom as an example of avatar

    Time:2021-4-21

    Personal development of the flash forum into the end, there is still the last upload pictures to replace the avatar function, worked all day, and finally solved all the problems, now record the solution. 1. Upload files To analyze what we need to do to change the avatar function, the simple idea is: upload the […]

  • Flash upload custom avatar example explanation

    Time:2021-4-20

    Flash web development is basically finished, but I still need to review it later. But I always feel that my blog is a little crude, so I’m using my brain to develop new functions Today, I think of the most basic function, custom avatar This kind of function is designed into two basic function blocks […]

  • Li Xingqiu Python is a man on the next 100 layer test program Tkinter game

    Time:2021-4-20

    “”” This work adoptsCC agreementReprint must indicate the author and the link of this article Python Wizard module

  • Use picgo and alicloud OSS object storage to build a drawing bed tool for automatic upload

    Time:2021-4-20

    catalog get readyBefore we start to build, we need to prepare something First, we need to have an alicloud object storage OSS object storage resource package. It’s very cheap. It’s one yuan a month. It’s very expensive However, Alibaba cloud will charge traffic fees later, but it’s not very expensive. I’ve been using OSS for […]