PyGMC CLI

The preferred method.

PyGMC has a command-line-interface CLI that becomes available after installed. Installing pygmc adds an entry point console script that becomes available as pygmc when the python environment is activated. You can find the script in <your_venv_path>/bin/pygmc.

pygmc --help

The discouraged method

If you simply copied the code or git clone (instead of installing pygmc) you should consider installing it. However, if you absolutely need an alternative method… you can go in the directory where pygmc lives and use the cli with the code below.

python -m pygmc.cli --help

pygmc

usage: pygmc [-h] [-p PORT] [-b BAUDRATE] {usb,live,save} ...
-h, --help

show this help message and exit

-p <port>, --port <port>

The USB port/com/dev e.g. /dev/ttyUSB0 Default=None will auto detect a port.

-b <baudrate>, --baudrate <baudrate>

USB communication baudrate Default=None will auto detect the baudrate.

pygmc live

usage: pygmc live [-h] [-t TIME]
-h, --help

show this help message and exit

-t <time>, --time <time>

Time is seconds to live print

pygmc save

usage: pygmc save [-h] -f FILE_NAME [--raw]
-h, --help

show this help message and exit

-f <file_name>, --file-name <file_name>

File path. e.g. ~/hist.csv (save history as csv in linux home dir)

--raw

Save raw as-is/unmodified device history.

pygmc usb

usage: pygmc usb [-h] [--all]
-h, --help

show this help message and exit

--all

List all USBs i.e. unfiltered