OpendTect
6.6
|
Classes | |
struct | ModuleInfo |
Public Member Functions | |
PythonAccess () | |
~PythonAccess () | |
void | addBasePath (const FilePath &) |
bool | execute (const OS::MachineCommand &, bool wait4finish=true) const |
bool | execute (const OS::MachineCommand &, BufferString &stdoutstr, BufferString *stderrstr, uiString *errmsg=nullptr) const |
bool | execute (const OS::MachineCommand &, const OS::CommandExecPars &, int *pid=nullptr, uiString *errmsg=nullptr) const |
bool | executeScript (const BufferStringSet &, bool wait4finish=true) const |
bool | executeScript (const char *, bool wait4finish=true) const |
const BufferStringSet & | getBasePythonPath () const |
uiRetVal | getModules (ManagedObjectSet< ModuleInfo > &) |
BufferString | getPacmanExecNm () const |
BufferStringSet | getUserPythonPath () const |
uiRetVal | hasModule (const char *modname, const char *minversion=nullptr) const |
bool | isModuleUsable (const char *nm) const |
uiRetVal | isUsable (bool force=false, const char *scriptstr=nullptr, const char *scriptexpectedout=nullptr) const |
BufferString | lastOutput (bool stderrout, uiString *launchermsg) const |
bool | openTerminal () const |
bool | openTerminal (const char *cmd, const BufferStringSet *args=nullptr, const char *workdir=nullptr) const |
uiString | pySummary () const |
BufferString | pyVersion () const |
void | setForScript (const char *scriptnm, OS::MachineCommand &) const |
uiRetVal | updateModuleInfo (const char *defprog="pip", const char *defarg="list") |
void | updatePythonPath () const |
uiRetVal | verifyEnvironment (const char *piname) |
Public Member Functions inherited from CallBacker | |
CallBacker () | |
CallBacker (const CallBacker &) | |
virtual | ~CallBacker () |
bool | attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const |
bool | attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const |
void | detachAllNotifiers () const |
Call from the destructor of your inherited object. More... | |
void | detachCB (const NotifierAccess &, const CallBack &) const |
void | detachCB (const NotifierAccess *notif, const CallBack &cb) const |
virtual bool | isCapsule () const |
bool | isNotifierAttached (const NotifierAccess *) const |
Only for debugging purposes, don't use. More... | |
void | stopReceivingNotifications () const |
Static Public Member Functions | |
static OD::DataRepType | getDataType (const char *) |
static BufferString | getDataTypeStr (OD::DataRepType) |
static void | getPathToInternalEnv (FilePath &, bool userdef) |
static const char * | getPythonActivatorPath () |
static void | GetPythonEnvBinPath (FilePath &) |
static void | GetPythonEnvPath (FilePath &) |
static bool | hasInternalEnvironment (bool allowuserdef=true) |
static uiRetVal | hasModule (const ObjectSet< ModuleInfo > &, const char *modname, const char *minversion=nullptr) |
static void | initClass () |
static bool | needCheckRunScript () |
static void | setPythonActivator (const char *) |
static const char * | sKeyActivatePath () |
static const char * | sKeyEnviron () |
static const char * | sKeyPythonPath () |
static const char * | sKeyPythonSrc () |
static BufferString | sKeyUseExtPyPath () |
static const char * | sPythonExecNm (bool v3=false, bool v2=false) |
static bool | validInternalEnvironment (const FilePath &) |
Static Public Member Functions inherited from CallBacker | |
static void | createReceiverForCurrentThread () |
static void | removeReceiverForCurrentThread () |
Public Attributes | |
Notifier< PythonAccess > | envChange |
Private Member Functions | |
void | createFireWallExeList (ManagedObjectSet< FilePath > &) |
bool | doExecute (const OS::MachineCommand &, const OS::CommandExecPars *, int *pid, const FilePath *activatefp, const char *envnm) const |
void | envChangeCB (CallBacker *) |
bool | isEnvUsable (const FilePath *pythonenvfp, const char *envnm, const char *scriptstr, const char *scriptexpectedout) |
bool | isUsable_ (bool force=false, const char *scriptstr=nullptr, const char *scriptexpectedout=nullptr) |
bool | retrievePythonVersionStr () |
Static Private Member Functions | |
static FilePath * | getActivateScript (const FilePath &root) |
static FilePath * | getCommand (OS::MachineCommand &, bool background, const FilePath *activatefp, const char *envnm) |
static bool | getCondaEnvFromTxtPath (ObjectSet< FilePath > &) |
static bool | getCondaEnvsFromTxt (BufferStringSet &) |
static bool | getInternalEnvironmentLocation (FilePath &, bool userdef) |
static FilePath | getInternalEnvPath (bool userdef) |
static OS::CommandLauncher * | getLauncher (const OS::MachineCommand &, bool background, const FilePath *activatefp, const char *envnm, FilePath &scriptfp) |
static void | getPIDFromFile (const char *pidfnm, int *pid) |
static bool | getSortedVirtualEnvironmentLoc (ObjectSet< FilePath > &, BufferStringSet &envnms, const BufferString *envnm=nullptr, const FilePath *extroot=nullptr) |
Private Attributes | |
FilePath * | activatefp_ = nullptr |
PtrMan< OS::CommandLauncher > | cl_ |
bool | istested_ = false |
bool | isusable_ = false |
BufferString | laststderr_ |
BufferString | laststdout_ |
ManagedObjectSet< ModuleInfo > | moduleinfos_ |
uiString | msg_ |
BufferString | pythversion_ |
BufferString | virtenvnm_ |
Static Private Attributes | |
static BufferStringSet | pystartpath_ |
Friends | |
class | ::ServiceMgrBase |
class | ::uiPythonSettings |
<>
OD::PythonAccess::PythonAccess | ( | ) |
OD::PythonAccess::~PythonAccess | ( | ) |
void OD::PythonAccess::addBasePath | ( | const FilePath & | ) |
|
private |
|
private |
|
private |
bool OD::PythonAccess::execute | ( | const OS::MachineCommand & | , |
bool | wait4finish = true |
||
) | const |
bool OD::PythonAccess::execute | ( | const OS::MachineCommand & | , |
BufferString & | stdoutstr, | ||
BufferString * | stderrstr, | ||
uiString * | errmsg = nullptr |
||
) | const |
bool OD::PythonAccess::execute | ( | const OS::MachineCommand & | , |
const OS::CommandExecPars & | , | ||
int * | pid = nullptr , |
||
uiString * | errmsg = nullptr |
||
) | const |
bool OD::PythonAccess::executeScript | ( | const BufferStringSet & | , |
bool | wait4finish = true |
||
) | const |
bool OD::PythonAccess::executeScript | ( | const char * | , |
bool | wait4finish = true |
||
) | const |
const BufferStringSet& OD::PythonAccess::getBasePythonPath | ( | ) | const |
|
staticprivate |
|
staticprivate |
|
static |
|
static |
|
staticprivate |
|
staticprivate |
|
staticprivate |
uiRetVal OD::PythonAccess::getModules | ( | ManagedObjectSet< ModuleInfo > & | ) |
BufferString OD::PythonAccess::getPacmanExecNm | ( | ) | const |
|
static |
|
staticprivate |
|
static |
|
static |
|
static |
|
staticprivate |
BufferStringSet OD::PythonAccess::getUserPythonPath | ( | ) | const |
|
static |
uiRetVal OD::PythonAccess::hasModule | ( | const char * | modname, |
const char * | minversion = nullptr |
||
) | const |
|
static |
|
static |
|
private |
bool OD::PythonAccess::isModuleUsable | ( | const char * | nm | ) | const |
uiRetVal OD::PythonAccess::isUsable | ( | bool | force = false , |
const char * | scriptstr = nullptr , |
||
const char * | scriptexpectedout = nullptr |
||
) | const |
|
private |
BufferString OD::PythonAccess::lastOutput | ( | bool | stderrout, |
uiString * | launchermsg | ||
) | const |
|
static |
bool OD::PythonAccess::openTerminal | ( | ) | const |
bool OD::PythonAccess::openTerminal | ( | const char * | cmd, |
const BufferStringSet * | args = nullptr , |
||
const char * | workdir = nullptr |
||
) | const |
uiString OD::PythonAccess::pySummary | ( | ) | const |
BufferString OD::PythonAccess::pyVersion | ( | ) | const |
|
private |
void OD::PythonAccess::setForScript | ( | const char * | scriptnm, |
OS::MachineCommand & | |||
) | const |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
|
static |
uiRetVal OD::PythonAccess::updateModuleInfo | ( | const char * | defprog = "pip" , |
const char * | defarg = "list" |
||
) |
void OD::PythonAccess::updatePythonPath | ( | ) | const |
|
static |
uiRetVal OD::PythonAccess::verifyEnvironment | ( | const char * | piname | ) |
|
friend |
|
friend |
|
private |
|
mutableprivate |
Notifier<PythonAccess> OD::PythonAccess::envChange |
|
private |
|
private |
|
mutableprivate |
|
mutableprivate |
|
private |
|
mutableprivate |
|
staticprivate |
|
private |
|
private |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2022