Connectivity Software User's Guide and Reference
QuickOPC Python (COM) Examples
QuickOPC > Examples > QuickOPC Examples > QuickOPC COM Examples > QuickOPC Python (COM) Examples
In This Topic

General

The features decribed or used here are only available if you included "COM development" during the installation of Connectivity Software. If the features are missing, simply re-run the installation program, making sure that "COM development" is included in the selection made on the "Installation Dashboard" setup wizard page.

Although QuickOPC can be used from Python over the COM API, as described in this article, this approach is now deprecated. The examples that use this approach are kept in the product for completeness only. With current QuickOPC versions, you should install and import the Python Packages, which in turn use the Python.NET package to expose the QuickOPC API to your Python code.

There is a comprehensive set of examples using this new approach. See QuickOPC Python Examples.

With earlier QuickOPC versions, the examples were tested in Python 3.4.2, with pywin32-219 extension (Build 219). and Python 3.6 (64-bit), and pywin32 (223) extension.  

In C:\PythonXX\Scripts, do:

pip install pypiwin32

 

The location can also be like

- C:\Users\userName\AppData\Local\Programs\Python\Python36-32\Scripts, or

- C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\Scripts.

 

We were not able to make COM event notifications work in Python (COM). For this reason, examples that work with events do so using the Event Pull Mechanism.

Where are the examples?

The examples are available in multiple formats and on different locations. You can pick the one that suits you the best.

Using Python Examples from Visual Studio

Here are some pieces of advise related to this mode of usage we have figured out. You may be well accustomed with them... but we weren't.

 

See Also

Examples

Development