memory_profiler.py: error: no such option #27

Closed
amcnabb opened this Issue Nov 6, 2012 · 1 comment

Projects

None yet

2 participants

@amcnabb
amcnabb commented Nov 6, 2012

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:

parser.disable_interspersed_args()
@fabianp fabianp added a commit that referenced this issue Nov 18, 2012
@fabianp Ignore unrecognized args.
Fix by @amcnabb. Fixes issue #27
a8dc01d
@fabianp
Owner
fabianp commented Nov 18, 2012

Added your fix and worked like a charm. Thanks!

@fabianp fabianp closed this Nov 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment