5.4.3. Client — Information about the client accessing a plug-in¶
| Threading: | This module should not be used outside the main thread. |
|---|
The Client module provides information about the client requesting information from a plug-in. Using this module, you can add newer features to a plug-in while maintaining legacy compatibility with older versions.
Note
Since plug-ins can respond to any client on a network, the Client module should only be used within functions that respond to client requests. Client information will be unreliable in internal functions called by the framework.
This module defines the following functions:
- Client.MajorVersion()¶
Returns the major version of the client, e.g. 0 for 0.8.2.
Returns: The major version Return type: int
- Client.MinorVersion()¶
Returns the minor version of the client, e.g. 8 for 0.8.2.
Returns: The minor version Return type: int
- Client.ReleaseVersion()¶
Returns the release number of the client, e.g. 2 for 0.8.2.
Returns: The release number Return type: int
- Client.VersionAtLeast(major=0, minor=0, release=0)¶
Checks whether the client meets the given minimum version requirement.
Returns: True if the client is the same or newer than the given version Return type: bool