摘要: def callback(func): def inner(obj, *args, **kwargs): res = func(obj, *args, **kwargs) if kwargs.get('callback'): callback = kwargs.get('callback') success ... 阅读全文
posted @ 2019-03-13 17:17 Leslie-x 阅读(960) 评论(0) 推荐(0) 编辑
摘要: import os import pandas as pd """ TCP 192.168.1.155:63758 129.211.126.69:4730 ESTABLISHED 12884 TCP 192.168.1.155:63973 129.211.126.69:4730 ESTABLISHED 3568 """ def k... 阅读全文
posted @ 2019-03-13 15:31 Leslie-x 阅读(5468) 评论(0) 推荐(0) 编辑
摘要: class UserIDFilter(admin.SimpleListFilter): # 自定义用户查询过滤器 title = _('关联用户') parameter_name = 'user_id' def lookups(self, request, model_admin): params = UserProfile.objects.a... 阅读全文
posted @ 2019-02-28 16:28 Leslie-x 阅读(902) 评论(0) 推荐(0) 编辑
摘要: from PyQt5.QtWebChannel import QWebChannel from PyQt5.QtWebEngineWidgets import QWebEngineView from PyQt5.QtCore import QUrl from interactive import JavascriptBridge class Browser(QWebEngineView): ... 阅读全文
posted @ 2019-02-27 22:32 Leslie-x 阅读(612) 评论(0) 推荐(0) 编辑
摘要: 方案说明 功能要求:实现网页加载后将页面截取成长图片涉及模块:PyQT5 PIL逻辑说明: 1:完成窗口设置,利用PyQT5 QWebEngineView加载网页地址,待网页加载完成后,调用check_pag; class MainWindow(QMainWindow): def __init__( 阅读全文
posted @ 2019-02-27 21:10 Leslie-x 阅读(4158) 评论(0) 推荐(0) 编辑
摘要: 1:安装virtualenv 2:创建并激活虚拟环境 更多资料请点击链接 阅读全文
posted @ 2019-02-27 15:05 Leslie-x 阅读(1122) 评论(0) 推荐(0) 编辑
摘要: PyQT5查找不到模块QtWebEngineWidgets 阅读全文
posted @ 2019-02-27 13:06 Leslie-x 阅读(2118) 评论(0) 推荐(0) 编辑
摘要: file_obj是Django的上传文件对象,可以作为model表中FileField字段的值 阅读全文
posted @ 2019-02-26 16:31 Leslie-x 阅读(379) 评论(0) 推荐(0) 编辑
摘要: import re u = "http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+" def match_by_re(str): pattern = re.compile(u, re.S) res = pattern.findall(string=str) if r... 阅读全文
posted @ 2019-02-26 16:27 Leslie-x 阅读(1711) 评论(0) 推荐(0) 编辑
摘要: 查看音频文件的信息(基于本地路径) 也可以把本地路径换成文件的url地址 阅读全文
posted @ 2019-02-26 14:26 Leslie-x 阅读(5710) 评论(0) 推荐(1) 编辑