Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes the mprof executable use sys.executable instead of "python" for subprocess #132

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Bernhard10
Copy link

When mprof run starts a subprocess, it now uses sys.executable as the python interpreter instead of the string python.

This is useful so the user can run mprof with a python version that is not in the first hit in the current PATH.

@patelamol
Copy link

Hi Whenever I try to do the 'mprof run <filename.py> ' it says 'mprof is not recognized as an internal or external command'.
But I am able to use the 'python -m memory_profiler <filename.py> ' but not the executable. Do you know why?

cmd_line = get_cmd_line(args)
args[1:1] = ("-m", "memory_profiler", "--timestamp",
"-o", mprofile_output)
#print(" ".join(args))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug print left here

@astrojuanlu
Copy link
Collaborator

Apart from the comment that @pquentin left, this will need a rebase. Anyone else wants to do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants