Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System commands are for UNIX machines, recommend supplemental file that describes how to make them work on Windows #33

Open
cooknl opened this issue Dec 11, 2015 · 0 comments

Comments

@cooknl
Copy link

cooknl commented Dec 11, 2015

UNIX system commands that show up in scientific-python-lectures and their Windows equivalents

PREFACE:
The Windows "cmd" window is of limited utility. Powershell is a windows shell utility with a greater scripting language. To use Powershell from python as a magic, you can download and use powershellmagic

https://pypi.python.org/pypi/powershellmagic/0.1.0

Install as a Python package:

$ pip install powershellmagic

Use in IPython Notebooks

In [1]: %load_ext powershellmagic


UNIX
;
WINDOWS


cat scripts/hello-world.py
;
!type scripts/hello-world.py #for cmd window

or

%%powershell
get-content scripts/hello-world.py


!head stockholm_td_adj.dat #There is no cmd window equivalent, !type will print the entire file
;
%%powershell
gc stockholm_td_adj.dat -TotalCount 3


!file random-matrix.npy
;
!assoc random-matrix.npy #Not really equivalent to !file


!rm -f dprod.pyf
;
%% powershell
!rm -f dprod.pyf


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant