Basic commands with a Python script
Python scripts can be used in Windows, macOS, and Linux operating systems, and
with other computing devices. Here we describe some basic processes on Windows
and macOS computers.
Configuring paho-mqtt in Windows
Python is not included with Windows by default, but you can download a suitable
version from the Microsoft Store.
1
Download Python and install it on your computer.
Press the Windows key (
) to open the search bar. Type
Store
and press
Enter
to
open the store. In the store, search for Python. Install Python 3.7.
2
Launch the command prompt program.
Press (
) to open the search bar. Type
Command Prompt
and press
Enter
.
3
Install Eclipse Paho on your computer.
Type
pip install paho-mqtt
and press
Enter
. The terminal program will issue a
few replies as it completes the installation. Now your computer should have all of
the files needed to communicate with the instrument.
Configuring paho-mqtt in Mac or Linux
Although Mac computers include Python by default, you need to install some addi-
tional libraries. This is done in the command line interface.
1
Launch the terminal program.
Type
CMD + Space
to open the search bar. Type
Terminal
, and press
Return
.
2
Install the PIP package manager for python
Type
easy_install pip
and press
Return
. If you get an error, type
sudo easy_
install pip
.
3
Install Eclipse Paho on your computer.
Type
pip install paho-mqtt
and press
Return
. If you get an error, type
sudo
pip install paho-mqtt
. The terminal program will issue a few replies as it com-
pletes the installation. Now your computer should have all of the files needed to
communicate with the instrument.
Section 7. Communication with the MQTT protocol
7-7
Basic commands with a Python script
Summary of Contents for LI-7815
Page 1: ...LI 7815 CO2 H2O Trace Gas Analyzer Instruction Manual...
Page 2: ......
Page 10: ...viii...
Page 30: ...Section 2 Getting started 2 14 LI 7815 CO H O Gas Analyzer...
Page 38: ...Section 3 Applications of the LI 7815 3 8 LI 7815 CO H O Gas Analyzer...
Page 42: ...Section 4 Software overview 4 4 LI 7815 CO H O Gas Analyzer...
Page 54: ...Section 4 Software overview 4 16 LI 7815 CO H O Gas Analyzer...
Page 62: ...Section 5 Troubleshooting 5 8 LI 7815 CO H O Gas Analyzer...
Page 70: ...Section 6 Maintenance 6 8 LI 7815 CO H O Gas Analyzer...
Page 88: ...Appendix B Additional safety information B 6 LI 7815 CO H O Gas Analyzer...
Page 92: ...Appendix C Specifications C 4 LI 7815 CO H O Gas Analyzer...
Page 97: ......