[TIP] os-independent file paths

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Thu Dec 8 07:39:12 PST 2011


On 01:22 pm, andrea.crotti.0 at gmail.com wrote:
>Testing functions which work on the file system I would like to be able
>to use some paths, both on Windows and on Linux.
>
>Now the problem is that paths are different on the two platforms, so my
>ideas was to have something like

Forward slashes are cross-platform.  Only cmd.exe is stuck on \ on 
Windows.  All of the actual filesystem APIs work with /.

Jean-Paul



More information about the testing-in-python mailing list