DAWorkbench 0.0.1
DAWorkbench API
载入中...
搜索中...
未找到
DA::DAPyInterpreter类 参考

python 环境管理类 此类设计为单例 更多...

#include <DAPyInterpreter.h>

class  PrivateData
 

Public 类型

using callback_finalize = std::function< void() >
 

Public 成员函数

void setPythonHomePath (const QString &path)
 设置python的运行路径
 
void initializePythonInterpreter ()
 
void registerFinalizeCallback (callback_finalize fp)
 
void shutdown ()
 
void ensureShutdown ()
 

静态 Public 成员函数

static DAPyInterpretergetInstance ()
 
static QString getAppPythonConfigFile ()
 获取python配置文件
 
static QString getPythonInterpreterPath ()
 获取python的路径
 
static QList< QFileInfo > wherePython ()
 获取系统记录的python环境
 
static QList< QFileInfo > wherePythonFromConfig ()
 

Protected 成员函数

void finalizePythonInterpreter ()
 

详细描述

python 环境管理类 此类设计为单例

这个类的封装是为了可以实现一些结束python环境的回调

成员函数说明

◆ getAppPythonConfigFile()

QString DA::DAPyInterpreter::getAppPythonConfigFile ( )
static

获取python配置文件

返回
$RETURN

◆ getPythonInterpreterPath()

QString DA::DAPyInterpreter::getPythonInterpreterPath ( )
static

获取python的路径

参数
$PARAMS
返回
$RETURN

先查看根目录下python-config.json

如果没有,就看看wherepython

◆ setPythonHomePath()

void DA::DAPyInterpreter::setPythonHomePath ( const QString &  path)

设置python的运行路径

参数
path

◆ wherePython()

QList< QFileInfo > DA::DAPyInterpreter::wherePython ( )
static

获取系统记录的python环境

返回

◆ wherePythonFromConfig()

QList< QFileInfo > DA::DAPyInterpreter::wherePythonFromConfig ( )
static

先查看根目录下python-config.json


该类的文档由以下文件生成: