Skip to content

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

jdmarch opened this Issue Aug 26, 2011 · 3 comments

2 participants

jdmarch commented Aug 26, 2011

In [1]: run
hello test temp world

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

In [3]: run ""
ERROR: File "".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 commented Aug 26, 2011

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

rkern commented Aug 26, 2011

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 commented Aug 29, 2011

Fixed by rkern's pull request #734

@jdmarch jdmarch closed this Aug 29, 2011
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.