sh doesn't print output unless wrapped in print()
devinnasar opened this issue · comments
devinnasar commented
According to the documentation, commands such as the following should print to the console when called:
sh.git.status()
sh.ls()
- etc.
The documentation has the user calling these commands verbatim, and not wrapped in print(). Can someone explain this? Am I doing it wrong?
Andrew commented
The commands return a string. If you execute them from the python console, python will print the result. If you execute them from a script, you need to print the result yourself.