摘要: 1. 获取操作tag 获取操作tag的接种方式: soup.find_all(name=None, attrs={}, recursive=True, text=None, limit=None, **kwargs),返回符合条件的所有标签,查找不到则返回[],可以传递标签名,标签属性,关键字参数, 阅读全文
posted @ 2019-12-17 17:30 华小电 阅读(2312) 评论(0) 推荐(0)
摘要: pyqt5信号要定义为类属性 #!/usr/bin/python3 # -*- coding: utf-8 -*- from PyQt5.Qt import * import sys class Win(QWidget): my_singal = pyqtSignal(str) def __init 阅读全文
posted @ 2019-12-12 08:40 华小电 阅读(3463) 评论(0) 推荐(0)
摘要: import sys from PyQt5.QtCore import Qt from PyQt5.QtWidgets import * from plot_pyqt import PlotCanvas class App(QMainWindow): def __init__(self): supe 阅读全文
posted @ 2019-11-05 11:12 华小电 阅读(8992) 评论(0) 推荐(1)
摘要: numpy中有一些常用的用来产生随机数的函数,randn()和rand()就属于这其中。 numpy.random.randn(d0, d1, …, dn)是从标准正态分布中返回一个或多个样本值。 numpy.random.rand(d0, d1, …, dn)的随机样本位于[0, 1)之间。 阅读全文
posted @ 2019-11-05 11:04 华小电 阅读(253) 评论(0) 推荐(0)
摘要: import sys from PyQt5.QtWidgets import * from PyQt5.QtGui import * class Example(QMainWindow): def __init__(self): super().__init__() self.initUI() de 阅读全文
posted @ 2019-11-03 15:00 华小电 阅读(228) 评论(0) 推荐(0)
摘要: 结果显示: UTC (Universal Coordinated time) time 输出结果: daysTo()计算从一个日子到另一日子之间间隔的天数 输出结果: 阅读全文
posted @ 2019-10-26 11:38 华小电 阅读(4328) 评论(0) 推荐(0)
摘要: import sys from PyQt5.QtWidgets import (QWidget, QToolTip, QPushButton, QApplication) from PyQt5.QtGui import QFont class Example(QWidget): def __init__(self): super().__init__() self.initUI() def ini 阅读全文
posted @ 2019-10-26 11:28 华小电 阅读(570) 评论(0) 推荐(0)
摘要: The QtCore module contains the core non-GUI functionality. This module is used for working with time, files and directories, various data types, strea 阅读全文
posted @ 2019-10-26 09:45 华小电 阅读(617) 评论(0) 推荐(0)
摘要: 运行python文件的时候报错: SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3:truncated \UXXXXXXXX escape 引起这个错误的原因就是转义的问题。 举 阅读全文
posted @ 2019-10-07 09:24 华小电 阅读(6062) 评论(1) 推荐(1)
摘要: 使用python中的ctypes模块可以很方便的调用windows的dll(也包括linux下的so等文件) 引入ctypes库 有两种方法 加载DLL stdcall调用约定:两种加载方式 cdecl调用约定:也有两种加载方式 引入ctypes库的方法不同,对应不同的加载DLL方式 第一种: 第二 阅读全文
posted @ 2019-10-07 09:16 华小电 阅读(5475) 评论(0) 推荐(0)