3 ms·
import sh git = sh.Command("/usr/bin/git") the Command object takes a full path, but you can use it together with sh's "which": import sh git = sh
by daenz 14y ago
import sh
git = sh.Command("/usr/bin/git")
the Command object takes a full path, but you can use it together with sh's "which":
import sh
git = sh.Command(sh.which("git"))