I just took a brief look at PowerShell (I knew it as Monad shell). My ignorant eyes see it more or less like a hybrid between regular bash and python. I would consider such integration between the two environments very cool on linux and osx, so I was wondering if it already exists (ipython is not really the same), and if not, why ?
-
Do you have any citation saying that PowerShell is a hybrid of anything at all, much less a hybrid of bash and python? Re "bash", you may be confusing the fact that there are aliases like "rm" with it being like bash.John Saunders– John Saunders2009-08-16 00:43:44 +00:00Commented Aug 16, 2009 at 0:43
-
I meant that to me it looks like that, not that it is, and similar functionalities could be achieved with a mixed "bash/python-like" environment. I don't use win, so I have no real clue about its real functionalities.Stefano Borini– Stefano Borini2009-08-16 00:50:13 +00:00Commented Aug 16, 2009 at 0:50
-
Ok. Do either python or bash have the concept of an object pipeline? Like the standard unix shell pipes, but sending actual objects instead of a text stream?John Saunders– John Saunders2009-08-16 00:56:59 +00:00Commented Aug 16, 2009 at 0:56
-
No, Powershell is pretty unique in terms of its functionality. The "why" bit can be answered easily enough too: *nix hackers would never accept it if it requires any more typing than what they currently use.Noldorin– Noldorin2009-08-16 01:21:31 +00:00Commented Aug 16, 2009 at 1:21
-
1Thanks for the answers. Seems the first step to implementing this would be to find a scripting language that allows one script to send an object to another script.John Saunders– John Saunders2009-08-16 01:48:01 +00:00Commented Aug 16, 2009 at 1:48
4 Answers
I've only dabbled in Powershell, but what distinguishes it for me is the ability to pipe actual objects in the shell. In that respect, the closest I've found is actually using the IPython shell with ipipe:
Following the recipes shown on that page and cooking up my own extensions, I don't often leave the IPython shell for bash. YMMV.
Comments
I think Hotwire is basically what you're thinking of:
http://code.google.com/p/hotwire-shell/wiki/GettingStarted0700
It's a shell-type environment where you can access the outputs as Python objects.
It doesn't have all PowerShell's handy hooks into various Windows system information, though. For that, you may want to literally integrate Python with PowerShell; that's described in IronPython In Action.
Comments
As far as PowerShell on Linux or OSX, see Pash, a cross-platform version of PowerShell using Mono.
2 Comments
An open source version of powershell does now exist. It can be found at https://msdn.microsoft.com/en-us/powershell.