News for hackers. Stuff that matters.
Re:Sh.py by lmm on Monday September 17, 2012 @10:09AM (#4532612)
Rightly or wrongly I expect import to be simple, fail only when packages haven't been installed properly, and more generally depend only on PYTHONPATH. When I'm debugging I don't normally even look at the import statements. Other replies have described what this does; I think I'd rather offer such functionality as something that looks like a method call that might fail (something like git = sh.getProxyForShellCommand("git") - probably not that verbose, my head's in java-land at the moment, but you get the idea)
Re:Sh.py by daenz on Monday September 17, 2012 @02:56PM (#4534206)

    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"))