[Python-3000] Mini Path object

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Sun Nov 12 11:58:27 CET 2006


"Paul Moore" <p.f.moore at gmail.com> writes:

>> I use 'posix' paths as my universal format. I convert them to native
>> paths just before writing them out or passing to a subsystem that
>> requires native paths.
>
> Not a valid option. C:\Data\a_file.txt is a perfectly valid posix
> format filename. It's a file in the current directory (with some very
> strange characters in it). But it's also a native path in Windows. So
> how do you interpret it?

The Boost Filesystem library has solved this problem by using the
POSIX-based syntax by default, with system-dependent modifications
possible, and by specifying a portable subset which avoids all the
system dependencies (but possibly can't express some filenames).
There is a separate constructor which accepts the native path syntax.

http://www.boost.org/libs/filesystem/doc/path.htm

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


More information about the Python-3000 mailing list