sdl2.ext.compat - Python compatibility helpers
The sdl2.ext.compat
module is for internal purposes of the sdl2
package and should not be used outside of the package. Classes, methods and
interfaces might change between versions and there is no guarantee of API
compatibility on different platforms and python implementations or between
releases.
- sdl2.ext.compat.ISPYTHON2
True
, if executed in a Python 2.x compatible interpreter,False
otherwise.
- sdl2.ext.compat.ISPYTHON3
True
, if executed in a Python 3.x compatible interpreter,False
otherwise.
- sdl2.ext.compat.long([x[, base]])
Note
Only defined for Python 3.x, for which it is the same as
int()
.
- sdl2.ext.compat.unicode(string[, encoding[, errors]])
Note
Only defined for Python 3.x, for which it is the same as
str()
.
- sdl2.ext.compat.callable(x) bool
Note
Only defined for Python 3.x, for which it is the same as
isinstance(x, collections.Callable)
- @sdl2.ext.compat.deprecated[source]
A simple decorator to mark functions and methods as deprecated. This will print a deprecation message each time the function or method is invoked.
- sdl2.ext.compat.deprecation(message: string) None [source]
Prints a deprecation message using the
warnings.warn()
function.
- exception sdl2.ext.compat.UnsupportedError(obj : object[, msg=None])[source]
Indicates that a certain class, function or behaviour is not supported in the specific execution environment.