portability question

M.-A. Lemburg mal at lemburg.com
Fri Aug 13 05:36:19 EDT 1999


Friedrich Dominicus wrote:
> 
> About file and directory handling on different platforms.
> 
> I'm aware that I can read the source to find out. But maybe someone can
> give me some other hints about that.
> 
> How is it done in Python? Do you think the Python solution of doing it
> is ok?

All those operating system specific quirks are nicely hidden
by the standard os module. Path conversion is implemented in the
submodule os.path. Docs are available at www.python.org and
included in your Python distribution.

BTW, reading the source will give you an impression of how difficult
it sometimes is to get things right.... ah yes, and as TimP would
say: text files aren't portable. Open them in binary mode and
then do the line ends stuff in Python.

Hope that helps,
-- 
Marc-Andre Lemburg
______________________________________________________________________
Y2000:                                                   140 days left
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/






More information about the Python-list mailing list