Enchance npz_preview

This commit is contained in:
2022-03-16 15:47:09 +01:00
parent 13baa5f8ce
commit e7ece8748b

View File

@@ -55,8 +55,10 @@ class Wrap:
setattr(self, f, n[f])
globs[f] = n[f]
archive = Wrap(argv[1])
print('Global namespace populated with "archive" and all files')
argv = argv[argv.index('--')+1:]
archives = [Wrap(arg) for arg in argv[::-1]]
archive = archives[0]
print('Global namespace populated with "archive", "archives" and all files')
EOM
)"
@@ -66,7 +68,16 @@ npz_preview() {
return
fi
python -ic "$npz_py_str" "$1"
python -ic "$npz_py_str" -- "$@"
}
npz_previewi() {
if [ $# -lt 1 ]; then
echo "Please specify file to open as argument"
return
fi
ipython -i -c "$npz_py_str" -- "$@"
}
rsync_wrap() {