[IPython-user] More Windows questions part 2 - \/ characters revisited

Fernando Perez Fernando.Perez at colorado.edu
Wed Dec 28 13:21:54 CST 2005


Ville Vainio wrote:
>>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.

OK, just committed it to SVN, many thanks.  Sorry for the long delay.

Best,

f




More information about the IPython-user mailing list