Hacker News new | ask | show | jobs
by humanrebar 4304 days ago
Ruby is generally more concise and easier to write though probably harder to maintain.

For example, when shelling out, ruby lets you do it many ways, including the familiar backtick syntax. In python, you shell out with popen -- you need to contruct argument lists, wire up stdout and stderr, etc.

Python's way might actually be better (more explicit, less ambiguity, easier to handle errors) but often you might just want something that's simple and readable.

For the record, there are nicer python APIs and safer ruby APIs. These are just general comments on the different ecosystems.

1 comments

Try the python 'sh' module (https://github.com/amoffat/sh). For example:

  from sh import git
  print git('version')