Source code for sh_example

#!/bin/python3
"""Demonstrate use of sh module."""

import sh


[docs]def echo(): """Use sh module to run bash echo command.""" return sh.echo("hello")
[docs]def test_echo(): """Test echo function.""" result = echo() assert result == "hello\n"
if __name__ == "__main__": print(sh.ls("."))