代码改变世界

阅读排行榜

python报错 TypeError: a() got multiple values for argument 'name'

2019-08-20 19:13 by yongchin, 42071 阅读, 收藏,
摘要: [问题现象] 在一次调用修饰函数中出现了问题,折腾了一下午,一直报错 TypeError: got multiple values for argument 只是很简单的调用 from tsu2Runner import AndroidActions auto = AndroidActions() 阅读全文

pyinstaller打包多个py文件仍报错ModuleNotFoundError: No module named 'xxx'

2019-03-05 15:50 by yongchin, 21490 阅读, 收藏,
摘要: [问题现象] 使用pyinstaller A.py -p b.py -p c.py打包多个文件 或者使用main.spec在Analysis配置好各个文件打包 打包成功后,运行main.exe仍然报错ModuleNotFoundError: No module named 'xxx' [问题原因] 阅读全文

Vue 3.x 全局引入axios 方法

2021-04-26 16:16 by yongchin, 20546 阅读, 收藏,
摘要: vue 全局引入 axios 大概会在网上找到下面两种方案: 一、改写Vue的原型属性 方法是在main.js中写入 import { createApp } from 'vue' import App from './App.vue' import axios from 'axios' const 阅读全文

python close()是假象,真正关闭Socket的方法

2017-08-25 17:20 by yongchin, 18100 阅读, 收藏,
摘要: 背景: 工作中自己用python写了一个tcp工具,然后用while循环一直接收消息,并且打印出来。然后正常close发现设备并没有离线,然后用了临时的规避方案,发现其实是一直阻塞在recv()接收方法里面,只要传输一条协议,让recv()吃到消息即可正常运行while来让其break退出,但是这种 阅读全文

使用tkinter加载png,jpg

2017-12-27 10:12 by yongchin, 15770 阅读, 收藏,
摘要: 最近来使用tkinter加载图片时遇到了困难,按照资料写了 photo = PhotoImage(file='ques.png') imglabel = Label(root, image=photo) imglabel.grid(row=0, column=0, columnspan=3) 却意外 阅读全文
1 2 3 4 5 ··· 13 下一页