Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

In Windows, %run fails to strip quotes from filename #733

Closed
jdmarch opened this Issue · 3 comments

2 participants

Jonathan March Robert Kern
Jonathan March
Collaborator

In [1]: run test_temp.py
hello test temp world

In [2]: run 'test_temp.py'
ERROR: File 'test_temp.py'.py not found.

In [3]: run "test_temp.py"
ERROR: File "test_temp.py".py not found.

Consequently, it seems impossible to run a file whose path includes a space, or to run any file without converting its backslashes to forward slashes.

This makes cross-platform development messier.

Jonathan March
Collaborator

Issues #95 and #378 also pertain to difficulty handling Windows paths.

Robert Kern
Collaborator

Specifically, the problem is that the .parse_options() method used by most of the builtin %magics uses shlex.split() with posix=False on Windows. Arguably, this is not wrong. However, %run and other magics ought to postprocess arguments that are filenames on Windows to remove quotes.

Jonathan March
Collaborator

Fixed by rkern's pull request #734

Jonathan March jdmarch closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.