随笔分类 -  python

摘要:程序中使用了 try: except:#这里没加任何异常 这就会导致程序不响应ctrl+c信号 except:前加上这个 except KeyboardInterrupt: sys.exit(0) 另外,不能直接使用exit(0),会报错 阅读全文
posted @ 2022-09-27 11:47 MoonXu 阅读(126) 评论(0) 推荐(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 阅读全文
posted @ 2022-08-11 16:42 MoonXu 阅读(61) 评论(0) 推荐(0) 编辑
摘要:name = r'conf/pic/12.jpg'namep = (c_char *100)(*bytes(name, 'utf-8')) 阅读全文
posted @ 2022-03-19 04:06 MoonXu 阅读(347) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2022-03-08 16:08 MoonXu 阅读(250) 评论(0) 推荐(0) 编辑
摘要:1.使用百度的接口 1)安装pip install baidu-aip#然后发现安装到系统python路径中,使用虚拟环境的pip 2)百度智能云->创建应用->...->管理应用->记下 AppID API Key Secret Key from aip import AipSpeechimpor 阅读全文
posted @ 2022-02-24 13:33 MoonXu 阅读(83) 评论(0) 推荐(0) 编辑
摘要:conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --set show_channel_urls yes conda config --show 换回默认源 阅读全文
posted @ 2022-02-21 13:35 MoonXu 阅读(658) 评论(0) 推荐(0) 编辑
摘要:conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=9.0 -c pytorch 阅读全文
posted @ 2022-02-21 13:05 MoonXu 阅读(713) 评论(0) 推荐(0) 编辑
摘要:创建文件ClearWindow添加内容 class ClearWindow: menudefs = [ ('options', [None, ('Clear Shell Window', '<<clear-window>>'), ]),] def __init__(self, editwin): s 阅读全文
posted @ 2019-05-24 17:20 MoonXu 阅读(498) 评论(0) 推荐(0) 编辑
摘要:tkinter是python 默认库无需安装,导入失败是包的名称写错了,可能叫Tkinter,或者tkinter多试一试 import tkintertop = tkinter.Tk()top.mainloop() 阅读全文
posted @ 2019-04-17 12:29 MoonXu 阅读(205) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示