Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
bashinator
on May 18, 2013
|
parent
|
context
|
favorite
| on:
Why Awk for AI? (1997)
I
really
like the python sh library for stuff like this. Would you rather do what you wrote, or this?
for listing in ls('-l'): '''etc'''
Here's the library in question -
https://pypi.python.org/pypi/pbs
- it makes me super happy to do shell work in python.
CatMtKing
on May 18, 2013
[–]
Wow, that's a neat library. You can just import any program and use it like a function (from sh import grep)! Thanks for the link. Also, sh documentation:
http://amoffat.github.io/sh/
bashinator
on May 19, 2013
|
parent
|
next
[–]
Yeah, it's replaced just a ton of boilerplate `def run(*args):` functions wrapping Popen. I couldn't be happier.
mkarttic
on May 18, 2013
|
parent
|
prev
[–]
i use Sh to interface with my cmus player. from sh import cmus_remote! :)
Consider applying for YC's Fall 2026 batch!
Applications
are open till July 27.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: