Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
jdmarch opened this Issue · 3 comments

2 participants

@jdmarch
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.

@jdmarch
Collaborator

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

@rkern

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.

@jdmarch
Collaborator

Fixed by rkern's pull request #734

@jdmarch 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.