随笔分类 - python
摘要:程序中使用了 try: except:#这里没加任何异常 这就会导致程序不响应ctrl+c信号 except:前加上这个 except KeyboardInterrupt: sys.exit(0) 另外,不能直接使用exit(0),会报错
阅读全文
摘要:import socket'''b'GET /index?name=jww HTTP/1.1\r\nHost: 127.0.0.1:8080\r\nConnection: keep-alive\r\nsec-ch-ua: "Chromium";v="104", " Not A;Brand";v="9
阅读全文
摘要:name = r'conf/pic/12.jpg'namep = (c_char *100)(*bytes(name, 'utf-8'))
阅读全文
摘要:cv2.error: Unknown C++ exception from OpenCV code The new version of OpenCV has some issues. Uninstall the newer version of OpenCV and install the old
阅读全文
摘要:1.使用百度的接口 1)安装pip install baidu-aip#然后发现安装到系统python路径中,使用虚拟环境的pip 2)百度智能云->创建应用->...->管理应用->记下 AppID API Key Secret Key from aip import AipSpeechimpor
阅读全文
摘要:conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --set show_channel_urls yes conda config --show 换回默认源
阅读全文
摘要:conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=9.0 -c pytorch
阅读全文
摘要:创建文件ClearWindow添加内容 class ClearWindow: menudefs = [ ('options', [None, ('Clear Shell Window', '<<clear-window>>'), ]),] def __init__(self, editwin): s
阅读全文
摘要:tkinter是python 默认库无需安装,导入失败是包的名称写错了,可能叫Tkinter,或者tkinter多试一试 import tkintertop = tkinter.Tk()top.mainloop()
阅读全文