On 2009-09-04, P.J. Eby <[email protected]> wrote: > At 09:30 PM 9/4/2009 +0000, Reinout van Rees wrote: >>There's one thing I couldn't find out: does the zipfile module report >>filenames as slashes or does it use the OS's preference? /me has no windows >>around to test it on. So there might be an OS inconsistency there. Running >>the tests on windows will uncover that, of course. > > If you use the pkg_resources get_metadata and > metadata_isdir/metadata_listdir operations, you can use /-separated > paths regardless of platform.
Ah, thanks. That's 18 lines of code gone in exchange for just 4 :-) No more "import zipfile". Reinout -- Reinout van Rees - [email protected] - http://reinout.vanrees.org Software developer at http://www.thehealthagency.com "Military engineers build missiles. Civil engineers build targets" _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
