python
未读
数据库mongodb
检测mongodb是否启动 from pymongo import MongoClient
try:
with MongoClient("mongodb://127.0.0.1:27017", serverSelectionTimeoutMS=1000) as c:
c.ad
python
未读
python多线程-进程
multiprocessing进程 import multiprocessing
import os
def worker1():
# printing process id
print("ID of process running worker1: {}".format(os.g
python
未读
pyside6常用控件 的 完整属性_方法_信号_槽 速查表
1.QPushButton(按钮) 分类 名称 说明 示例代码 属性 text() 获取文字 btn.text() 属性 setText(str) 设置文字 btn.setText("确定") 属性 setEnabled(bool) 启用/禁用 btn.setEnabled(False) 属性 se
python
未读
pyside6常用代码片段
pyside6初始化 from PySide6.QtWidgets import QWidget, QApplication, QPushButton, QHBoxLayout, QGroupBox
import Ui_uis
class MyMainWindow(QWidget):
def _
python
未读
Python打包为exe执行文件
window系统下发布: 一、安装pyinstaller(PyInstaller 3.3.1) pip install pyinstaller
二、python程序打包(不带参数) 文件命名规范:不支持中文命令的python文件; 路径:建议路径中不带中文目录; 命令:pyinstaller -F