DekTec logo
StreamXpress Remote Control: Python Setup Guide  

StreamXpress Remote Control: Python Setup Guide

To control the StreamXpress player application remotely with Python scripts, you need to install Python and ensure StreamXpress is correctly set up. This guide provides step-by-step instructions for setting up Python on a Windows system and preparing StreamXpress for remote control.

 

References

The official Python website

Zeep: Python SOAP client

Step 1: Install Python

  1. Download Python:
  2. Run the Installer:
    • Launch the downloaded installer.
    • Make sure to check the "Add Python to PATH" option. This allows you to run Python from the command line.
  3. Verify the Installation:
    • Open a Command Prompt.
    • Run the following commands to ensure Python and its package manager (pip) are correctly installed:
    • python -–version
      pip --version

Step 2: Install Zeep

Zeep is a Python library for building and consuming SOAP (Simple Object Access Protocol) web services. This allows you to interact with the StreamXpress remote-control protocol using Python.

  1. Open a Command Prompt.
  2. Install Zeep:
    • Use the following command to install Zeep and its dependencies:
    pip install zeep

Step 3: Install Python Package

The Python Package for controlling StreamXpress provides Python scripts with essential constants, types and function prototypes necessary for interacting with the StreamXpress player application.

  1. Download the Package:
    • Download the Python Package for controlling StreamXpress from the link provided on the left side of this page.
    • Unzip the downloaded file.
    • Move the unzipped content to a subfolder 'SpRcImport' within your client application's working directory.
  2. Package Contents:
    File Description
    __init__.py Marks the directory as a Python package.
    DTAPI_constants.py Defines DTAPI constants (refer to “DTAPI Reference – Core Classes” for details).
    SPRC_client.py Provides Python interface functions to control StreamXpress using the WSDL-file.
    SPRC_constants.py Defines SPRC constants (refer to the “SpRcApi” documentation for details).
    SPRC_types.py Contains the Python SPRC type used in the SPRC functions.
    SpRc.wsdl Specifies the StreamXpress Remote Control (SpRc) SOAP messages, detailing the protocol for communication between your client application and the StreamXpress.

Step 4: Create and Run Your Python Application

  1. Directory Structure:
    /path/to/your/application ──┬── YourClientApp.py
                                └───SpRcImport
                                    ├── __init__.py
                                    ├── DTAPI_constants.py
                                    ├── SPRC_client.py
                                    ├── SPRC_constants.py
                                    ├── SPRC_types.py
                                    └── SpRc.wsdl
  2. Run your Python applications in its working folder:
    python YourClientApp.py