Python under PowerShell adds characters

Chris Angelico rosuav at
Wed Mar 29 14:39:19 EDT 2017

On Thu, Mar 30, 2017 at 5:29 AM, Rob Gaddi
<rgaddi at highlandtechnology.invalid> wrote:
> Engineer 1: Man, that old DOS shell we keep emulating is just getting older
> and clunkier.
> Engineer 2: I know, we should rewrite it.  You know, whole new thing, really
> modernize it.
> E1: So, like, bring in bash like everyone else?
> E2: No, better.  How about something that integrates with no preexisting
> workflow in the world.
> E1: Wait, but what commands would it use?
> E2: New ones.

My understanding of PowerShell is more like this:

E1: Man, batch files are so clunky. It's a ridiculous hodge-podge.

E2: Yeah, every shell ever written is clunky. Let's do our own thing
and make it more like a scripting language.

E1: Cool! Only, we won't use an existing language, we'll make our own,
because it'll be better.

E2: I love this plan.

We've had discussions on this list about using Python as a job control
shell, and the usual response is: Python sucks as a command executor.
It's just not designed for that. The clunkiness of bash is precisely
BECAUSE it's designed to be convenient and comfortable for a sysadmin.
All those weird splitting and escaping rules are because (a) the
easiest way to do piping, command sequencing, etc is with symbols, (b)
you can't stop people from using those symbols in file names or
arguments, and (c) it's a pain to have to quote every single string.

AIUI PowerShell is somewhat like VBScript, only it isn't quite that
either. But it's definitely more like a scripting language than a
shell language.


More information about the Python-list mailing list