spack/lib/spack
Todd Gamblin a7b43f1015 spack python: add -m option to run modules as scripts
It's often useful to run a module with `python -m`, e.g.:

    python -m pyinstrument script.py

Running a python script this way was hard, though, as `spack python` did
not have a similar `-m` option.  This PR adds a `-m` option to `spack
python` so that we can do things like this:

    spack python -m pyinstrument ./test.py

This makes it easy to write a script that uses a small part of Spack and
then profile it.  Previously thee easiest way to do this was to write a
custom Spack command, which is often overkill.
2020-02-12 16:45:41 -08:00
..
docs Git fetching: add option to remove submodules (#14370) 2020-02-03 19:02:45 -08:00
env copyright: update copyright dates for 2020 (#14328) 2019-12-30 22:36:56 -08:00
external copyright: update copyright dates for 2020 (#14328) 2019-12-30 22:36:56 -08:00
llnl Adds fma and vsx features to entire power arch family. (#14759) 2020-02-06 16:42:05 +01:00
spack spack python: add -m option to run modules as scripts 2020-02-12 16:45:41 -08:00