Platforms to show: All Mac Windows Linux Cross-Platform
Back to PythonMBS class.
PythonMBS.ExecPrefix as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared property | Python | MBS Python Plugin | 24.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This is derived through a number of complicated rules from the program name set with Py_SetProgramName() and some environment variables; for example, if the program name is '/usr/local/bin/python', the exec-prefix is '/usr/local'.
The value is available to Python code as sys.exec_prefix. It is only useful on Unix.
Background: The exec-prefix differs from the prefix when platform dependent files (such as executables and shared libraries) are installed in a different directory tree. In a typical installation, platform dependent files may be installed in the /usr/local/plat subtree while platform independent may be installed in /usr/local.
Generally speaking, a platform is a combination of hardware and software families, e.g. Sparc machines running the Solaris 2.x operating system are considered the same platform, but Intel machines running Solaris 2.x are another platform, and Intel machines running Linux are yet another platform. Different major revisions of the same operating system generally also form different platforms. Non-Unix operating systems are a different story; the installation strategies on those systems are so different that the prefix and exec-prefix are meaningless, and set to the empty string. Note that compiled Python bytecode files are platform independent (but not independent from the Python version by which they were compiled!).
System administrators will know how to configure the mount or automount programs to share /usr/local between platforms while having /usr/local/plat be a different filesystem for each platform.
(Read only property)
PythonMBS.LibraryError as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared property | Python | MBS Python Plugin | 24.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
(Read only property)
PythonMBS.LibraryVersion as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared property | Python | MBS Python Plugin | 24.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns e.g. "3.12.3 (main, Apr 9 2024, 08:09:14) [Clang 15.0.0 (clang-1500.3.9.4)]"
(Read only property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared property | Python | MBS Python Plugin | 24.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true if loaded or false if not.
(Read only property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared property | Python | MBS Python Plugin | 24.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This is computed from the program name (set by assigning ProgramName) and some environment variables. The returned string consists of a series of directory names separated by a platform dependent delimiter character. The delimiter character is ':' on Unix and macOS, ';' on Windows.
The list sys.path is initialized with this value on interpreter startup; it can be (and usually is) modified later to change the search path for loading modules.
e.g.
/opt/homebrew/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python312.zip:/opt/homebrew/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12:/opt/homebrew/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/lib-dynload
(Read only property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared property | Python | MBS Python Plugin | 24.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This is derived through a number of complicated rules from the program name set with Py_SetProgramName() and some environment variables; for example, if the program name is '/usr/local/bin/python', the prefix is '/usr/local'.
The value is available to Python code as sys.prefix. It is only useful on Unix.
(Read only property)
PythonMBS.ProgramFullPath as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared property | Python | MBS Python Plugin | 24.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This is computed as a side-effect of deriving the default module search path from the program name (set by assignment to ProgramName).
The value is available to Python code as sys.executable.
This is usually the path to your Xojo application.
(Read only property)
PythonMBS.ProgramName as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared property | Python | MBS Python Plugin | 24.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Can be set before initializing Python, otherwise the default will be "python".
(Read and Write property)
PythonMBS.PythonHome as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared property | Python | MBS Python Plugin | 24.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The value is set by a previous with setting PythonHome property, or the value is the value of the PYTHONHOME environment variable if it is set.
(Read and Write property)
The items on this page are in the following plugins: MBS Python Plugin.