etgalloway / powershellmagic

IPython magic for Windows PowerShell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

powershellmagic

powershellmagic is an IPython extension, modeled after IPython's %%script magic, that supports the execution of IPython cells written in Windows PowerShell.

Install

As a Python package:

$ pip install powershellmagic

As an IPython extension:

In [1]: %install_ext https://raw.github.com/etgalloway/powershellmagic/master/powershellmagic.py

Use

In [1]: %load_ext powershellmagic

In [2]: %%powershell
   ...: Get-WMiObject -Class Win32_Process |
   ...:     Where-Object { $_.Name -like "*python.exe" } |
   ...:     Select-Object ProcessName, ProcessID, ParentProcessId |
   ...:     Format-Table -AutoSize
   ...:

ProcessName ProcessID ParentProcessId
----------- --------- ---------------
ipython.exe      5600            5616
python.exe       1740            5600

About

IPython magic for Windows PowerShell

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%