os.path.escape?
Bruce Sass
bsass at freenet.edmonton.ab.ca
Fri May 18 13:19:32 EDT 2001
On Fri, 18 May 2001, Mike C. Fletcher wrote:
> Hi all, wondering if someone has such a beast they're willing to share.
> Basically something that, given an arbitrary "name" by the user, eliminates
> all system-specific special characters (i.e. on Win32 and Mac, lets " "
> characters through, but not on *nix). Will settle for Win32 specific if I
> have to...
Why not allow " " in paths on unix?
~$ cd tmp
~/tmp$ cat >> "hi there"
See, it works.
~/tmp$ ls -l "hi there"
-rw-r--r-- 1 bsass bsass 15 May 18 11:13 hi there
~/tmp$ cat "hi there"
See, it works.
- Bruce
More information about the Python-list
mailing list