BUG: Issue #755 qt IPythonWidget.execute_file fails if filename contains... #1122

Closed
wants to merge 12 commits into from

3 participants

@jdmarch

... both single and double quotes

@takluyver
IPython member

Quick thought, because I was working on some similar code recently - is there a simple way to get the necessary escaping using repr()?

@jdmarch

@takluyver I think only if #1123 were resolved

@jdmarch jdmarch Cleaner fix for qt execute_file bug:
Possible because double quotes can be escaped in double quotes (unlike single in single) in posix.
5f0d4ad
@jdmarch

Cleaner fix is possible because double quotes do not (as I had assumed) have the same limitation as single quotes, as described by @minrk at #1109

minrk added some commits Dec 11, 2011
@minrk minrk set HeartMonitor.tic on start
Minor cosmetic change, but now `HeartMonitor.lifetime` actually reflects the lifetime of the object, rather than the lifetime of Unix :).
5994d4f
@minrk minrk add timestamps to parallel app log output
Makes the log prefix pretty long, but provides important debugging information for long-running jobs.
025436b
@minrk minrk Merge PR #1143 (Python3 StartMenu items)
Start Menu items are now installed with bdist_wininst on Python 3.

closes #1143
5047149
@minrk
IPython member

This one looks good to me. Since it's not used inside IPython, we'll have to trust you with testing.

minrk and others added some commits Dec 11, 2011
@minrk minrk Merge pull request #1073 from takluyver/storemagic-plugin
* %store is now a plugin
* adds a 'default_extensions' list for extensions that should always be loaded.
d3ded1a
@jdmarch jdmarch Merge branch 'qt_execute_file_both_quote_kinds' of github.com:jdmarch…
…/ipython into jdmarch-qt_execute_file_both_quote_kinds
a142ba4
@jdmarch

Arggh "cleaner fix" fails on Windows. Back in a bit.

@jdmarch jdmarch BUG: execute_file fix failed on Windows.
Stripping code down to non-platform-specific essence
at cost of some unnecessary escaping.
86ce21e
@jdmarch

Stripped down to cross-platform essence at the cost of a little extra escaping, tested on OSX and now Windows too.

@minrk
IPython member

Okay, so now it's just the one replacement: if any quote or ' ' wrap in ", escaping \", yes? That seems right to me. If you are comfortable with it in your environments, then I'll go ahead and merge. This PR seems to be reflecting recent changes to master, but it's easy to see what the real commits are, so that doesn't matter.

@jdmarch

Correct summary, yes comfortable, and thank you.

@minrk minrk added a commit that referenced this pull request Dec 12, 2011
@minrk minrk Merge PR #1122 (IPythonWidget.execute_file)
Fixes escaped filename in IPythonWidget.execute_file, when it contains
spaces and/or quotes.

closes #755
closes #1122
b24c9d2
@minrk minrk added a commit that closed this pull request Dec 12, 2011
@minrk minrk Merge PR #1122 (IPythonWidget.execute_file)
Fixes escaped filename in IPythonWidget.execute_file, when it contains
spaces and/or quotes.

closes #755
closes #1122
b24c9d2
@minrk minrk closed this in b24c9d2 Dec 12, 2011
@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
@minrk minrk Merge PR #1122 (IPythonWidget.execute_file)
Fixes escaped filename in IPythonWidget.execute_file, when it contains
spaces and/or quotes.

closes #755
closes #1122
5925257
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment