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

Closed
jdmarch opened this Issue Aug 26, 2011 · 3 comments

2 participants

@jdmarch

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

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

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