Seems like there is lots of talk here about how this is thin wrapper over `subprocess`, but I like the idea. What I don't like is that the logo looks like a penis with a mustache.
Show HN: Sultan – Pythonic interface to your shell
21–30 of 54 posts
Re: Show HN: Sultan – Pythonic interface to your shell
#22Seems like there is lots of talk here about how this is thin wrapper over `subprocess`, but I like the idea. What I don't like is that the logo looks like a penis with a mustache.
Re: Show HN: Sultan – Pythonic interface to your shell
#23Earlier quoted context omitted.
I looked at the source code. Under the hood, it's just a thin wrapper around `subprocess`.
Cool subprocess is a little verbose. But did you happen to notice if it executes with shell=True or shell=False?
https://docs.python.org/3/library/subprocess.html#using-the-...
Re: Show HN: Sultan – Pythonic interface to your shell
#24Nice stuff though
Re: Show HN: Sultan – Pythonic interface to your shell
#25Imagine writing a wrapper for "grep". It may work in one environment, but if you need portability, you're going to quickly realize that there are nuances in implementation and the actual calling interface. Now you're handling branching logic in your application code based on platform, version, etc.
Interfacing with a command line tool shouldn't be thought of much different than a remote HTTP/ReST API talking text/plain instead of application/json. You're looking for your "client wrapper" to handle argument validation, parsing, versioning, etc.
Re: Show HN: Sultan – Pythonic interface to your shell
#26Earlier quoted context omitted.
And your point is??
At the risk of simply putting words into noobiemcfoob's mouth: "Xonsh is " NOT " how to do this."
Why are we trying to interface with bash to run commands from python in the first place? Cut out the middleman, bash, which is just a nuisance in the way.
Re: Show HN: Sultan – Pythonic interface to your shell
#27When I dabble with Python to get a job done, I invariably end up using subprocess at some stage and going through some contortions. I like the look of Sultan, it seems well thought out and has loads of well written docs. Anyone know how the name came about?
Re: Show HN: Sultan – Pythonic interface to your shell
#28Re: Show HN: Sultan – Pythonic interface to your shell
#29Earlier quoted context omitted.
At the risk of simply putting words into noobiemcfoob's mouth: "Xonsh is " NOT " how to do this."
OK. I thought this would be so obvious that people would see it. Sultan says "Sultan was created to help with scripts that we create with Bash, that tend to get complex." If one has an open mind, one should be asking "why would I use bash for this at all, when there exists a far superior command shell, xonsh, which incorporates all of bash's capability, with all of python, in one piece?" Why are we trying to interfac…
Re: Show HN: Sultan – Pythonic interface to your shell
#30This seems to be a simple wrapper around subprocess, but I'm afraid it is not changing things dramatically. Overall, I don't agree that Sultan's syntax is any more Pythonic than subprocess itself. +1 for https://sultan.readthedocs.io/en/latest/sultan-examples.html... I think it would be interesting if you could iterate on the results of "ls -l", where each row is represented by an object.