Ruby is a much better candidate for this. Nicer syntax and a vastly better standard library.
listing = `ls -oh`
puts listing
puts $?.to_i # Prints status of last system command.
Some equivalent Python 3.7+ would be
import subprocess
listing = subprocess.run(("ls", "-oh"), capture_output=True, encoding="utf-8")
print(listing.stdout)
print(listing.returncode)
As an experienced Ruby programmer I imagine the code you provided looks like a no-brainer. To a Ruby neophyte the backticks, $? sigil, and .to_i method don't strike me as intuitive (but maybe they would be do someone else). We may just have to disagree about the nicety of syntax.As cle mentioned[1], the strongest criteria is
> what would the majority of people on the team prefer to use?
and I'd agree that ultimately that's what makes the most sense.