python哪些事

    科技2023-11-06  86

    1.安装pip

    wget https://bootstrap.pypa.io/get-pip.py python3 get-pip.py

    2.图片与base64格式转换

    #图片转成base64 with open('image.jpg', 'rb') as f: img = base64.b64encode(f.read()) img_base64 = img.decode() #base64转成图片 with open('photo.jpg','wb') as f: f.wirte(base64.b64decode(img_base64))
    Processed: 0.013, SQL: 9