23 class uiPythonSettings;
27 class CommandExecPars;
28 class CommandLauncher;
48 const char* scriptstr=
nullptr,
49 const char* scriptexpectedout=
nullptr)
const;
52 bool wait4finish=
true)
const;
66 bool isModuleUsable(
const char* nm)
const;
68 static bool hasInternalEnvironment(
bool allowuserdef=
true);
69 static bool validInternalEnvironment(
const FilePath&);
71 static const char* sPythonExecNm(
bool v3=
false,
bool v2=
false);
72 static const char* sKeyPythonSrc();
73 static const char* sKeyEnviron();
80 ModuleInfo(
const char*);
87 uiRetVal verifyEnvironment(
const char* piname);
89 uiRetVal updateModuleInfo(
const char* cmd=
"pip list");
91 uiRetVal hasModule(
const char* modname,
92 const char* minversion=0)
const;
97 bool istested_ =
false;
98 bool isusable_ =
false;
108 bool isUsable(
bool force=
false,
109 const char* scriptstr=
nullptr,
110 const char* scriptexpectedout=
nullptr);
111 static bool getInternalEnvironmentLocation(
FilePath&,
113 static FilePath getInternalEnvPath(
bool userdef);
114 static bool getSortedVirtualEnvironmentLoc(
119 bool isEnvUsable(
const FilePath* pythonenvfp,
121 const char* scriptstr,
122 const char* scriptexpectedout);
132 static void getPIDFromFile(
const char* pidfnm,
int* pid);
136 const char* envnm)
const;
138 bool retrievePythonVersionStr();
139 void envChangeCB(CallBacker*);
141 friend class ::uiPythonSettings;
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
PythonSource
Definition: pythonaccess.h:35
Notifier< PythonAccess > envChange
Definition: pythonaccess.h:75
Definition: pythonaccess.h:37
BufferString laststdout_
Definition: pythonaccess.h:102
#define mStruct(module)
Definition: commondefs.h:165
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Specifies how to execute a command.
Definition: oscommand.h:34
#define mGlobal(module)
Definition: commondefs.h:163
#define mDeclareNameSpaceEnumUtils(mod, enm)
Definition: enums.h:274
Definition: oscommand.h:24
Encapsulates an actual command to execute + the machine to run it on.
Definition: oscommand.h:80
Launches machine commands.
Definition: oscommand.h:143
Definition: uistring.h:89
Set of BufferString objects.
Definition: bufstringset.h:28
BufferString pythversion_
Definition: pythonaccess.h:105
Definition: pythonaccess.h:37
BufferString laststderr_
Definition: pythonaccess.h:103
Definition: callback.h:254
Set of pointers to objects.
Definition: commontypes.h:32
bool canDoCUDA(BufferString &maxverstr)
ManagedObjectSet< ModuleInfo > moduleinfos_
Definition: pythonaccess.h:106
PtrMan< OS::CommandLauncher > cl_
Definition: pythonaccess.h:101
File pathname tools.
Definition: filepath.h:34
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Object with a name.
Definition: namedobj.h:35
Definition: uistring.h:243
Definition: pythonaccess.h:41
OpendTect.
Definition: commontypes.h:29
Timer class.
Definition: timer.h:25
BufferString virtenvnm_
Definition: pythonaccess.h:100
uiString msg_
Definition: pythonaccess.h:104
Definition: pythonaccess.h:37