msl.examples.loadlib.labview32 module

A wrapper around a 32-bit LabVIEW library, labview_lib32.

Attention

This example requires that the appropriate LabVIEW Run-Time Engine is installed and that the operating system is Windows.

Example of a server that loads a 32-bit shared library, labview_lib, in a 32-bit Python interpreter to host the library. The corresponding labview64 module can be executed by a 64-bit Python interpreter and the Labview64 class can send a request to the Labview32 class which calls the 32-bit library to execute the request and then return the response from the library.

class msl.examples.loadlib.labview32.Labview32(host, port, **kwargs)[source]

Bases: Server32

A wrapper around the 32-bit LabVIEW library, labview_lib32.

Parameters:
  • host (str) – The IP address of the server.

  • port (int) – The port to open on the server.

Note

Any class that is a subclass of Server32 MUST provide two arguments in its constructor: host and port (in that order) and **kwargs. Otherwise the server32 executable, see start_server32, cannot create an instance of the Server32 subclass.

stdev(x, weighting=0)[source]

Calculates the mean, variance and standard deviation of the values in the input x.

See the corresponding 64-bit stdev() method.

Parameters:
  • x (list of float) – The data to calculate the mean, variance and standard deviation of.

  • weighting (int, optional) – Whether to calculate the sample, weighting = 0, or the population, weighting = 1, standard deviation and variance.

Returns:

  • float – The mean.

  • float – The variance.

  • float – The standard deviation.