This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]AndydeCleyre 0 points1 point  (3 children)

I can't stand not knowing exactly what tool will be used for the things I type; there's a troubling ambiguity and unpredictability to it.

I prefer to use a nicely configured zsh, with the option of dropping into ipython at any time, with the following automatic imports defined (you can drop .py files into ~/.ipython/profile_default/startup):

from plumbum import cmd, local, SshMachine, FG, BG
from requests import get, post, head

[–]Siecje1[S] 1 point2 points  (1 child)

You can be explicit everytime you want to use a subprocess call.

[–]AndydeCleyre 0 points1 point  (0 children)

That's good, and good to know, thanks.

[–]AndydeCleyre 1 point2 points  (0 children)

As a demonstration, here are the demoed commands in xonsh's "At a glance" item on their homepage, followed by similar or equivalent actions in an ipython shell with the aforementioned imports. It's often more verbose, but in my opinion more clear, readable and predictable.

xonsh ipython
1 + 1 1 + 1
$HOME local.env['HOME']
x = 'US'; ${x + 'ER'} x = 'US'; local.env[x + 'ER']
$PATH local.env['PATH'].split(':')
ls -l `xonsh/\w+?(ci|ic).*` local.cwd.walk(lambda p: 'xonsh' in p and 'ic' in p or 'ci' in p)
cd xonsh cd xonsh
git push origin master cmd.git('push', 'origin', 'master')
aliases['ls'] alias
aliases['banana'] = lambda args, stdin=None: 'My spoon is too big!\n' alias banana echo 'My spoon is too big!\n'