Re: OS specific path separator variable
Bram Moolenaar <[email protected]>
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Lars Ivar Igesund wrote: > In some circumstances it seems like a variable holding the > correct path separator for the platform could come in handy. > > e.g. > $bindir$(pathsep)foo.d > > What do you think? In most situations a slash will work. Only when making a shell command on MS-Windows you sometimes need to use a backslash, since the slash is used for option flags. In those situations you mostly know a backslash is required, thus you don't need a variable. Or is there a common situation where you do need to use the system-dependend separator? You can use `os.sep`. Is it worth adding an Aap variable for this? If it is then I think it should be $SEP. Using $PATHSEP is a bit confusing, because the Python `os.pathsep` is the separator used in $PATH. -- A disclaimer for the disclaimer: "and before I get a huge amount of complaints , I have no control over the disclaimer at the end of this mail :-)" (Timothy Aldrich) /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/