Previous page

Next page

Parallels Python API Concepts

Parallels Python API is a wrapper of the C API described earlier in this guide. While it is based on the same essential principles as the C API, there are some notable differences. They are summarized below.

  • Handles are not directly visible in the Python API. Instead, Python classes are used. You don't obtain a handle in Python, you obtain an instance of a class.
  • Instead of calling a C function passing a handle to it, you use a Python class and call a method of that class.
  • Memory management is automatic. This means that you don't have to free a handle (destroy an object) when it is no longer needed.
  • No callbacks! Callback functionality does not exist in the Parallels Python API. This means a few things. First, it is impossible to receive asynchronous method results via callbacks, which essentially means that these methods are not truly asynchronous in the Python API. Second, you cannot receive system event notifications in Python. Finally, you cannot automatically receive periodic performance reports (you can still obtain the reports via synchronous calls).
  • Error handling is implemented using exceptions.
  • Strings are handled as objects (not as char arrays compared to the C API), which makes it much easier to work with strings as input and output parameters.

In This Section

Package and Modules

Classes

Class Methods

Error Handling