Show HN: Pysh – run shell commands in Python
github.comI was bored and tired of creating subprocess wrappers for lots of projects, so I made this.
The implementation is fairly naive and a bit slow, but it works well in my testing.
Might be a bit useless, but it was a fun and somewhat interesting project. if in the main python file, I include another python file that also contains shell commands, can Pysh parse the includes too? It's possible but I haven't tested it enough to iron out any kinks. And right now the main routines are return-blocked by an environment variable (PYSH_ROOT) thats set when the first pysh wrapper is started. Feel free to remove these and test how well it works for you. EDIT:
I might have misunderstood, if they're in an import they wont be parsed right now, you would need to run pysh() in there too. I haven't tested so I'm not sure how this will work.