Jcstone IP属地:湖北

文章 关注 粉丝 访问 贡献
 
共 13 篇文章
显示摘要每页显示  条
main.py二、pluginManager.py代码。import osimport importlibclass PluginManager: __PluginPath = ''plugins'' def __init__(self): super().__init__(self) @staticmethod def GetPluginModules(): modules = [] pluginPath = PluginManager.__PluginPath if not os.path.isdir(pl...
log_filepath = os.path.join(logs_dir, log_filename)通过工厂方法获取Logger实例logging.getLogger([name=None]),直接调用LogHelper.InitLogger方法:logging.info(''this is a loggging info message'')logging.debug(''this is a loggging debug message'')logging.warning(''this is loggging a...
本文主要讲述PyCharm+PyQGIS开发环境配置步骤
在 Windows 上使用VSCode 和 Python3 设置 PyQGIS3在 Windows 上使用 VSCode 和 Python3 设置 PyQGIS3.{"folders": [{"name": "app","path": "C:\\Users\\tyler\\source\\repos\\diy-gis"}]}& ''C:\python38\python.exe'' ''c:\Users\tyler\.vscode\extensions...
def GetPipePoints(startpoint, endpoint, radius, num):points_start, points_end = GetPipePoints(startpoint, endpoint, radius, num)b = sqrt((pointp[0] - endpoint[0])**2 + (pointp[1] - endpoint[1])**2 +.f"a={a} b={b} c={c} a_angle={a_angle} b_angle={b_angle} c_angle={c_angle}"# print(f"a_angle={a_angle} b_a...
Python 控制台窗体关闭按钮禁用和启用。很多Python控制台程序需长期运行,但是一不小心就点上控制台窗体关闭按钮,没有任何提示就终止了正在运行的程序。控制台窗口(windows)需安装pywin32api,引用其中的win32console, win32gui和 win32con 三个模块。根据 win32con,获取关闭按钮菜单条目、菜单常数。关闭按钮菜单条目为win32con.SC_CLOSE...
PyQT5 窗体Signal与Slot传参1 基本步骤。(1)在主窗体定义子窗体,子窗体必须先在init中定义,否则闪退,即使采用exec_()不闪退,但无法接收子窗体传来的信号。self.btnCAL.clicked.connect(self.slot)self._signal.emit(self.projectparam)(4)在主窗体定义按钮调用子窗体获得信号。Frmgauss_fs._signal.connect(self.getparameter)# Ui_frm...
通过python生成简单3D管道的方法。通过空间坐标旋转平移的方法,得到管道起止点的圆截面(正多边形顶点——其法线向量与起止点向量相同),根据顶点构建管道面。并保存为obj文件
Python Flask Restful token验证。self.password_hash = generate_password_hash(password)return check_password_hash(self.password_hash, password)def verify_auth_token(token):def verify_password(username_or_token, password):user = User.verify_auth_token(username_or_token)user = User.query.filter_by(username=username_or_tok...
python读取数据库PostgreSQL导出shapefile(shp)文件1.现有数据和目标成果1.1现有数据。众所周知,shapefile是ESRI公司制定的GIS数据的一种格式,一个正常的shapefile至少包括三部分:shp、dbf和shx。recordRows = cur.fetchall()2.创建shp文件。for recordRow in recordRows:w.record(recordRow[0],recordRow[1],recordRow[2],recordRow[3],r...
帮助 | 留言交流 | 联系我们 | 服务条款 | 下载网文摘手 | 下载手机客户端
北京六智信息技术股份有限公司 Copyright© 2005-2024 360doc.com , All Rights Reserved
京ICP证090625号 京ICP备05038915号 京网文[2016]6433-853号 京公网安备11010502030377号
返回
顶部