You can clone with
When running python -m memory_profiler script_file.py --some-args, memory_profile assumes that --some-args is intended for it rather than for script_file.py. This is easy to fix by adding the following single line immediately after creating the OptionParser:
python -m memory_profiler script_file.py --some-args
Ignore unrecognized args.
Fix by @amcnabb. Fixes issue #27
Added your fix and worked like a charm. Thanks!