Live data from Hacker News

Show HN: Sultan – Pythonic interface to your shell

sultan.readthedocs.io

11–20 of 54 posts

Re: Show HN: Sultan – Pythonic interface to your shell

#11
post #7

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??

At the risk of simply putting words into noobiemcfoob's mouth:

"Xonsh is " NOT " how to do this."

Re: Show HN: Sultan – Pythonic interface to your shell

#13

I've been using 'tentakel' for remote server admin for years, 'fabric' for lightweight deployment, and more recently 'invoke' for local invocations (all are Python projects). This project looks interesting too, will give it a try. BTW: Has anyone news on Fabric 2 ?

Would love to know this as well.

Re: Show HN: Sultan – Pythonic interface to your shell

#15

How does s(command_from_potentially_unsafe_source).run() compare with os.system(command_from_potentially_unsafe_source) or subprocess.call(command_from_potentially_unsafe_source, shell=True) securitywise? I'm assuming all three are equally bad?

I looked at the source code. Under the hood, it's just a thin wrapper around `subprocess`.

Re: Show HN: Sultan – Pythonic interface to your shell

#16

How does s(command_from_potentially_unsafe_source).run() compare with os.system(command_from_potentially_unsafe_source) or subprocess.call(command_from_potentially_unsafe_source, shell=True) securitywise? I'm assuming all three are equally bad?

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?

Re: Show HN: Sultan – Pythonic interface to your shell

#18
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.

Post reply on HN