how is it different from Fabric ? Nice stuff though
Fabric is great for DevOps, but there are applications that we build that aren't catered for DevOps work, and that is why I created Sultan.
41–50 of 54 posts
how is it different from Fabric ? Nice stuff though
Fabric is great for DevOps, but there are applications that we build that aren't catered for DevOps work, and that is why I created Sultan.
Seems similar to the package sh/pbs. [0] [0] https://amoffat.github.io/sh/
Earlier quoted context omitted.
Xonsh is a shell that integrates Python at the command line. This is a library to make calls to the command line.
And your point is??
I wrote a pretty significant process wrapper in python at $PREVIOUS_JOB. The problem I have with these loose wrappers around subprocess is that they're, imho, solving the wrong problem. Or, maybe better put, not solving _enough_ of the problem. Imagine 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…
I originally wanted to have Sultan to do exactly what you're saying, but when I started diving into it, it seemed like a task that was very tough to solve. For example, grep's syntax remains similar between OS, but it has some API changes between versions. Trying to figure out what version has what syntax seems a bit daunting, and perhaps impossible to do with all commands.
The usecase that Sultan really caters to is the developer who writes their code on one OS, and keeps that code in the same OS across different environments. Not everyone wants their code to run across different OS and Distributions. I felt like it was a special case to do this, and decided to keep Sultan as generic as possible and let developers build the logic for different OS and Distributions on top of it.
The problem Sultan does solve is code maintainability, reusability within their own project (which assumes the project runs on 1 OS), and testability (unit and integration tests can be written, while you can't do that in Bash easily).
This 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.
When 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?
I was also trying to grow a Handlebar mustache at the time, and I wanted my logo to have a Handlebar Mustache, so that's why the logo has a Handlebar Mustache :-)
Ive written numerous python wrappers around shell commands for all sorts of one off utils, but this is nice and flexible and generic. Sultan looks well thought out. Open to contributors?
>Bash, while it seems arcaine, actually is quiet powerful! This line triggered me.
Earlier quoted context omitted.
And then I remember that Windows PowerShell does (attempts to, to be fair) exactly that
attempts to, to be fair Output of ls in PS is an Array of objects (DirectoryInfo or FileInfo instances). How is that merely an attempt?
Very nice! I've been using somewhat similar sh [1] for the same purpose. It's nice seeing more alternatives. [1] https://amoffat.github.io/sh/
Two more resources on top of sh: Invoke: http://www.pyinvoke.org/ wraps subprocess commands into Makefile-like tasks Fabric: http://www.fabfile.org/ Same as invoke, but catered to remote subprocess commands over SSH