On Wed, 2011-06-22 at 10:44 -0700, Tim Hanson wrote:
> Thanks for your responses to my student question about using OS paths in 
> Python.
> 
> For the more general case, I am a Linux user interested in making my scripts 
> platform neutral, which would include Linux, Unix (including Mac), and 
> Windows.  I have looked at the python.org os segment and didn't get an answer.
> 
> Is there a library (bonus would be some tutorial material) for making sure my 
> Linux scripts access files and directories on the other platforms 
> transparently?  I don't need the information immediately, but at some point...

You could go all out and use the PyFilesystem module:

   http://packages.python.org/fs/


This provides a unified API not only for accessing files on your local
disk in a platform-agnostic manner, but also for accessing files in a
zip archive, on a remote server, in memory, and from a variety of other
sources.

Even if you only ever intend to access local files, I find the API
provided by PyFilesystem much nicer than using the various modules from
the stdlib.


  Cheers,

     Ryan


-- 
Ryan Kelly
http://www.rfk.id.au  |  This message is digitally signed. Please visit
r...@rfk.id.au        |  http://www.rfk.id.au/ramblings/gpg/ for details

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to