Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
=========== =================================================================================================================================== Info Contains a Python API for interacting with Measurement Computing's Universal Library in Windows. See GitHub_ for the latest source. Author Measurement Computing =========== ===================================================================================================================================
The mcculw package contains an API (Application Programming Interface) for interacting with the I/O Library for Measurement Computing Data Acquisition products, Universal Library. This package was created and is supported by MCC. The package is implemented in Python as a wrapper around the Universal Library C API using the ctypes_ Python Library.
Note: The **mcculw** examples included in version 1.0.0 and later are not backward compatible with pre-release
versions of the **mcculw** Python package. See the `Examples`_ section for more details.
mcculw is supported for Universal Library 6.55 and later. Some functions in the mcculw package may be unavailable with earlier versions of Universal Library. Visit http://www.mccdaq.com/Software-Downloads.aspx to upgrade your version of UL.
mcculw supports only the Windows operating system.
mcculw supports CPython 2.7 and 3.4+.
The mcculw package is available on GitHub_ and PyPI_.
Install Python version 2.7, 3.4, or later from https://www.python.org/downloads/ .
Install the latest version of InstaCal from http://www.mccdaq.com/Software-Downloads.aspx .
Install the the MCC UL Python API for Windows (mcculw) and any dependencies using pip:
a. Open the Windows command prompt: press Win+R, type cmd.exe and press Enter. b. Upgrade pip to the latest version by entering the following command::
pip install --upgrade pip
c. Install the mcculw library by entering the following command::
pip install mcculw
Note: If you get a message like "pip is not recognized as an internal or external command...", or if you have multiple Python installations, enter the full path to the pip executable, such as C:\Python27\Scripts\pip install --upgrade pip or C:\Python27\Scripts\pip install mcculw. The pip command is in the Scripts subdirectory of your Python install location.
Download the examples zip file
_ from the mcculw GitHub repository.
Unzip the examples to a known location, such as::
C:\Users\Public\Documents\Measurement Computing\DAQ\Python
Refer to the knowledgebase article Importing Python for Windows example programs into an IDE
_
for detailed instructions on how to import examples into popular IDEs such as Eclipse and Visual
Studio.
Note: The latest examples take advantage of the **mcculw.device_info** subpackage
added in version 1.0.0. Software developed using the props subpackage included in
the examples folder of pre-release versions will continue to work with version 1.0.0
and later of the **mcculw** Python package, but requires the inclusion of the props subdirectory.
See the mcculw GitHub `Releases`_ page for a complete archive of previous releases.
The following is a basic example of using the Universal Library to perform analog input. Further
examples may be found on GitHub
_.
.. code-block:: python
from mcculw import ul from mcculw.enums import ULRange from mcculw.ul import ULError
board_num = 0 channel = 0 ai_range = ULRange.BIP5VOLTS
try: # Get a value from the device value = ul.a_in(board_num, channel, ai_range) # Convert the raw value to engineering units eng_units_value = ul.to_eng_units(board_num, ai_range, value)
# Display the raw value
print("Raw Value: " + str(value))
# Display the engineering value
print("Engineering Value: " + '{:.3f}'.format(eng_units_value))
except ULError as e: # Display the error print("A UL error occurred. Code: " + str(e.errorcode) + " Message: " + e.message)
The mcculw package is supported by MCC. For support for mcculw, contact technical support through http://www.mccdaq.com/Support.aspx . Please include version information for Python, Universal Library and the mcculw packages used as well as detailed steps on how to reproduce the problem in your request.
To report a bug or submit a feature request, please use the mcculw GitHub Issues
_ page.
Documentation is available in the Universal Library Help
_.
.. Links:
.. _GitHub: https://github.com/mccdaq/mcculw
.. _PyPI: https://pypi.python.org/pypi/mcculw
.. _ctypes: https://docs.python.org/3/library/ctypes.html
.. _Universal Library Help
: https://www.mccdaq.com/PDFs/Manuals/Mcculw_WebHelp/ULStart.htm
.. _GitHub Issues
: https://github.com/mccdaq/mcculw/issues
.. _examples zip file
: https://github.com/mccdaq/mcculw/raw/master/examples.zip
.. _Importing Python for Windows example programs into an IDE
: http://kb.mccdaq.com/KnowledgebaseArticle50716.aspx
.. _Releases
: https://github.com/mccdaq/mcculw/releases
FAQs
MCC Universal Library Python API for Windows
We found that mcculw demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.