OpendTect
7.0
|
Classes | |
struct | ModuleInfo |
Public Member Functions | |
PythonAccess () | |
~PythonAccess () | |
void | addBasePath (const FilePath &) |
CNotifier< PythonAccess, const uiRetVal & > & | envVerified () |
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 &, BufferString &stdoutstr, uiRetVal &, BufferString *stderrstr=nullptr) const |
bool | execute (const OS::MachineCommand &, const OS::CommandExecPars &, int *pid=nullptr, uiString *errmsg=nullptr) const |
bool | execute (const OS::MachineCommand &, const OS::CommandExecPars &, uiRetVal &, int *pid=nullptr, BufferString *stdoutstr=nullptr, BufferString *stderrstr=nullptr) const |
bool | execute (const OS::MachineCommand &, uiRetVal &, bool wait4finish=true, BufferString *stdoutstr=nullptr, BufferString *stderrstr=nullptr) const |
bool | executeScript (const BufferStringSet &, bool wait4finish, uiRetVal &, BufferString *stdoutstr=nullptr, BufferString *stderrstr=nullptr) const |
bool | executeScript (const BufferStringSet &, bool wait4finish=true) const |
bool | executeScript (const BufferStringSet &, BufferString &stdoutstr, uiRetVal &, BufferString *stderrstr=nullptr) const |
bool | executeScript (const char *, bool wait4finish, uiRetVal &, BufferString *stdoutstr=nullptr, BufferString *stderrstr=nullptr) const |
bool | executeScript (const char *, bool wait4finish=true) const |
bool | executeScript (const char *, BufferString &stdoutstr, uiRetVal &, BufferString *stderrstr=nullptr) const |
const FilePath * | getActivateFp () const |
BufferStringSet | getBasePythonPath () const |
const char * | getEnvName () const |
uiRetVal | getModules (ManagedObjectSet< ModuleInfo > &) |
BufferString | getPacmanExecNm () const |
FilePath | getPythonEnvFp () const |
PythonSource | getPythonSource () const |
BufferStringSet | getUserPythonPath () const |
uiRetVal | hasModule (const char *modname, const char *minversion=nullptr) const |
bool | isModuleUsable (const char *nm) const |
bool | isModuleUsable (const char *nm, uiRetVal &) const |
uiRetVal | isUsable (bool force=false, BufferString *stdoutstr=nullptr, BufferString *stderrstr=nullptr) 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 char *cmd, const BufferStringSet *args=nullptr, const char *workdir=nullptr) const |
bool | openTerminal (const char *cmd, uiRetVal &, const BufferStringSet *args=nullptr, const char *workdir=nullptr) const |
uiString | pySummary () const |
BufferString | pyVersion () const |
uiRetVal | setEnvironment (const FilePath *rootfp, const char *envnm) |
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 |
virtual CallBacker * | trueCaller () |
Static Public Member Functions | |
static uiString | firewallDesc () |
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 FilePath | getPythonEnvFp (const FilePath &activatefp) |
static void | GetPythonEnvPath (FilePath &) |
static PythonSource | getPythonSource (const FilePath *envrootfp) |
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 | reReadFWRules (const BufferString &fpstr) |
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 | appToBeStartedCB (CallBacker *) |
void | createFireWallExeList (ManagedObjectSet< FilePath > &) |
bool | doExecute (const OS::MachineCommand &, const OS::CommandExecPars *, int *pid, const FilePath *activatefp, const char *envnm) const |
uiRetVal | doExecute (const OS::MachineCommand &, const OS::CommandExecPars *, int *pid, const FilePath *activatefp, const char *envnm, BufferString *stdoutstr, BufferString *stderrstr) const |
const BufferStringSet & | getBasePythonPath_ () const |
bool | isEnvUsable (const FilePath *pythonenvfp, const char *envnm, const char *scriptstr, const char *scriptexpectedout) |
bool | isEnvUsable (const FilePath *pythonenvfp, const char *envnm, uiRetVal &, BufferString *stdoutstr=nullptr, BufferString *stderrstr=nullptr) |
bool | isUsable_ (bool force, uiRetVal &, BufferString *stdoutstr=nullptr, BufferString *stderrstr=nullptr) |
bool | isUsable_ (bool force=false, const char *scriptstr=nullptr, const char *scriptexpectedout=nullptr) |
void | pluginsLoaded (CallBacker *) |
bool | retrievePythonVersionStr () |
void | verifyEnvironmentCB (CallBacker *) |
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_ |
Threads::Lock | lock_ |
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 |
|
private |
CNotifier<PythonAccess,const uiRetVal&>& OD::PythonAccess::envVerified | ( | ) |
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 & | , |
BufferString & | stdoutstr, | ||
uiRetVal & | , | ||
BufferString * | stderrstr = nullptr |
||
) | const |
bool OD::PythonAccess::execute | ( | const OS::MachineCommand & | , |
const OS::CommandExecPars & | , | ||
int * | pid = nullptr , |
||
uiString * | errmsg = nullptr |
||
) | const |
bool OD::PythonAccess::execute | ( | const OS::MachineCommand & | , |
const OS::CommandExecPars & | , | ||
uiRetVal & | , | ||
int * | pid = nullptr , |
||
BufferString * | stdoutstr = nullptr , |
||
BufferString * | stderrstr = nullptr |
||
) | const |
bool OD::PythonAccess::execute | ( | const OS::MachineCommand & | , |
uiRetVal & | , | ||
bool | wait4finish = true , |
||
BufferString * | stdoutstr = nullptr , |
||
BufferString * | stderrstr = nullptr |
||
) | const |
bool OD::PythonAccess::executeScript | ( | const BufferStringSet & | , |
bool | wait4finish, | ||
uiRetVal & | , | ||
BufferString * | stdoutstr = nullptr , |
||
BufferString * | stderrstr = nullptr |
||
) | const |
bool OD::PythonAccess::executeScript | ( | const BufferStringSet & | , |
bool | wait4finish = true |
||
) | const |
bool OD::PythonAccess::executeScript | ( | const BufferStringSet & | , |
BufferString & | stdoutstr, | ||
uiRetVal & | , | ||
BufferString * | stderrstr = nullptr |
||
) | const |
bool OD::PythonAccess::executeScript | ( | const char * | , |
bool | wait4finish, | ||
uiRetVal & | , | ||
BufferString * | stdoutstr = nullptr , |
||
BufferString * | stderrstr = nullptr |
||
) | const |
bool OD::PythonAccess::executeScript | ( | const char * | , |
bool | wait4finish = true |
||
) | const |
bool OD::PythonAccess::executeScript | ( | const char * | , |
BufferString & | stdoutstr, | ||
uiRetVal & | , | ||
BufferString * | stderrstr = nullptr |
||
) | const |
|
static |
|
inline |
BufferStringSet OD::PythonAccess::getBasePythonPath | ( | ) | const |
|
private |
|
staticprivate |
|
staticprivate |
|
static |
|
static |
|
inline |
|
staticprivate |
|
staticprivate |
|
staticprivate |
uiRetVal OD::PythonAccess::getModules | ( | ManagedObjectSet< ModuleInfo > & | ) |
BufferString OD::PythonAccess::getPacmanExecNm | ( | ) | const |
|
static |
|
staticprivate |
|
static |
|
static |
FilePath OD::PythonAccess::getPythonEnvFp | ( | ) | const |
|
static |
PythonSource OD::PythonAccess::getPythonSource | ( | ) | const |
|
static |
|
staticprivate |
BufferStringSet OD::PythonAccess::getUserPythonPath | ( | ) | const |
|
static |
uiRetVal OD::PythonAccess::hasModule | ( | const char * | modname, |
const char * | minversion = nullptr |
||
) | const |
|
static |
|
static |
|
private |
|
private |
bool OD::PythonAccess::isModuleUsable | ( | const char * | nm | ) | const |
bool OD::PythonAccess::isModuleUsable | ( | const char * | nm, |
uiRetVal & | |||
) | const |
uiRetVal OD::PythonAccess::isUsable | ( | bool | force = false , |
BufferString * | stdoutstr = nullptr , |
||
BufferString * | stderrstr = nullptr |
||
) | const |
uiRetVal OD::PythonAccess::isUsable | ( | bool | force = false , |
const char * | scriptstr = nullptr , |
||
const char * | scriptexpectedout = nullptr |
||
) | const |
|
private |
|
private |
BufferString OD::PythonAccess::lastOutput | ( | bool | stderrout, |
uiString * | launchermsg | ||
) | const |
|
static |
bool OD::PythonAccess::openTerminal | ( | const char * | cmd, |
const BufferStringSet * | args = nullptr , |
||
const char * | workdir = nullptr |
||
) | const |
bool OD::PythonAccess::openTerminal | ( | const char * | cmd, |
uiRetVal & | , | ||
const BufferStringSet * | args = nullptr , |
||
const char * | workdir = nullptr |
||
) | const |
|
private |
uiString OD::PythonAccess::pySummary | ( | ) | const |
BufferString OD::PythonAccess::pyVersion | ( | ) | const |
|
static |
|
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 | ) |
|
private |
|
friend |
|
friend |
|
private |
|
mutableprivate |
Notifier<PythonAccess> OD::PythonAccess::envChange |
|
private |
|
private |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
private |
|
mutableprivate |
|
staticprivate |
|
private |
|
private |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024