rsudp.entry_points (convenience fx)

New in version 1.0.3.

These are some convenience functions for editing rsudp’s settings and monitoring log output.

rsudp.entry_points.ep_cat_log()

This function uses a posix system’s cat command to print messages in the rsudp log file. It is provided for convenience only.

It is accessible via the console command rs-log on posix (Linux, MacOS) style operating systems.

Note

This function is the equivalent of cat /tmp/rsudp/rsudp.log on Linux/MacOS and type "C:/tmp/rsudp/rsudp.log" on Windows.

rsudp.entry_points.ep_edit_settings()

This function calls the system’s default text editor to open the settings file for editing. It is provided for convenience only.

This function is accessible via the console command rs-settings.

Advanced users may prefer to add an alias in place of this function. The alias should override the entrypoint command set in rsudp’s setup.py.

On Linux and MacOS, adding an alias may look like this:

# add the alias definition to the aliases file
echo "alias rsudp-settings='nano ~/.config/rsudp/rsudp_settings.json'" >> .bash_aliases
# then reload the console
bash

To add an alias on Windows via the command prompt is much more difficult, so the method is not provided here.

Note

This function has been tested on multiple operating systems, but because each system’s functionality and defaults may be different, proper operation cannot be not guaranteed.

rsudp.entry_points.ep_tailf_log()

This function uses a the system’s follow command to follow new messages added to the log file. It is provided for convenience only.

This function is accessible via the console command rs-tailf.

The function will run until it receives a keyboard interrupt (Ctrl+C).

Note

This function is the equivalent of tail -f /tmp/rsudp/rsudp.log on Linux/MacOS and Get-Content -Path "C:/tmp/rsudp/rsudp.log" -Wait on Windows.

Back to top ↑