Created
June 5, 2017 16:57
-
-
Save seumasmorrison/64e303aeb0e8b61979d03d2fbd3cfeb2 to your computer and use it in GitHub Desktop.
IPython snippet for iterating over hva files in multiple directories on one level which uses shells command and cd single line magic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for directory in dirs: | |
%cd {directory} | |
!pwd | |
hva_files = !ls *.hva | |
for hva_file in hva_files: | |
!decode_hva.exe -f csv -o {hva_file[:-4]}%s.csv {hva_file} | |
%cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment