[IPython-user] More Windows questions part 2 - \/ characters revisited
Ville Vainio
vivainio at gmail.com
Tue Aug 16 16:10:35 CDT 2005
> That was precisely my fear. I can't play with this for a day or two, so why
> don't you keep testing it and make some notes. In a couple of days I'll ping
> you to see where you're at, and I'll implement locally whatever has survived
> your testing so far, and will use it for a while on my copy. If it works for
> both (and anyone else willing to try it), then I'll commit it.
Just before hitting bed (soon :) I implemented the patch (raw-string,
triple-quoted, with stripping of padding char to allow \ at end) on my
linux box, and it seems to work pretty well, here's a transcipt of a
session:
IPython profile: pysh
ville at ubuntu[~]|1> cd t
ville at ubuntu[~/t]|2> ls foo\ bar
a.tmp
ville at ubuntu[~/t]|3> !ls foo\ bar
a.tmp
ville at ubuntu[~/t]|4> !ls "foo bar"
a.tmp
ville at ubuntu[~/t]|5> !ls 'foo bar'
a.tmp
ville at ubuntu[~/t]|6> !ls foo bar
ls: foo: No such file or directory
ls: bar: No such file or directory
ville at ubuntu[~/t]|7>
So it works exactly as expected. I removed quoting of ", because when
using triple quotes it's not needed, and \'s are intact.
The patch is attached (my first svn patch!), at least take a look at
it. I imagine it would even be safe to try it on your local copy
already, it's after all only prone to hurt ! escaping... and it works
on my home linux box just fine.
--
Ville Vainio - http://tinyurl.com/2prnb
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: shell_escape_triplequote.diff
Url: http://projects.scipy.org/pipermail/ipython-user/attachments/20050817/78edfc43/attachment.pl
More information about the IPython-user
mailing list