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 completes
the installation. Now your computer should have all of the files needed to com-
municate with the instrument.
Section 7. Communication with the MQTT protocol
7-7
Basic commands with a Python script
Summary of Contents for LI-7820
Page 1: ...LI 7820 N2O H2O Trace Gas Analyzer Instruction Manual ...
Page 2: ......
Page 10: ...viii ...
Page 28: ...Section 2 Getting started 2 12 LI 7820 N O H O Gas Analyzer ...
Page 36: ...Section 3 Applications of the LI 7820 3 8 LI 7820 N O H O Gas Analyzer ...
Page 52: ...Section 4 Software overview 4 16 LI 7820 N O H O Gas Analyzer ...
Page 66: ...Section 6 Maintenance 6 8 LI 7820 N O H O Gas Analyzer ...
Page 84: ...Appendix B Additional safety information B 6 LI 7820 N O H O Gas Analyzer ...
Page 91: ......