file open fails.

John Machin sjmachin at lexicon.net
Thu Mar 26 00:16:52 EDT 2009


On Mar 26, 3:06 pm, alex23 <wuwe... at gmail.com> wrote:
> On Mar 26, 8:05 am, Scott David Daniels <Scott.Dani... at Acm.Org> wrote:
>
> > Well, yes in a way, but lots of places in windows you can get a copy
> > of a full file spec into the cut buffer, so you cut/paste rather than
> > type.  If you do that, you get the backslashes (and you better be
> > prepared for that by using r'' to paste into).
>
> The obvious solution, then, is to write something that monitors the
> clipboard, intercepts any strings that are file paths, and replaces
> the backslashes with their forward counterpart...
>
> :)

You would need to monitor where the user was about to paste it --
forward slashes in file paths are not grokked well at all in a Command
Prompt window :-S



More information about the Python-list mailing list