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

Not able to use run magic with file path contain -m in windows #12288

Open
dddping opened this issue May 6, 2020 · 0 comments
Open

Not able to use run magic with file path contain -m in windows #12288

dddping opened this issue May 6, 2020 · 0 comments

Comments

@dddping
Copy link

dddping commented May 6, 2020

strange error message

  • To run magic
    %run "r:\abc\abc.py"
    If file not exist, the error msg should be File 'r:\\abc\\abc.py' not found.
  • However, sometimes it mess up the path...
    For example
    %run "r:\abc-m\abc.py"
    Error msg File '\'"r:\\abc-m\\abc.py"\'.py' not found.

Insight

The function para parameter_s seem to get mess up by following branch
if '-m' in parameter_s and '--' not in parameter_s:
Let say parameter_s = "r:\abc-m\abc.py", but since it contain "-m" in the path, it will change to "'r:\abc-m\abc.py'" after above if clause.

https://github.com/ipython/ipython/blob/master/IPython/core/magics/execution.py : 655

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

No branches or pull requests

1 participant